I have a c++ code with 3 classes in separate files
but they are interacting with each other. Now when ever i run the code i am getting these errors can any body tell me what are they and how to solve them
Attachment 9935
Printable View
I have a c++ code with 3 classes in separate files
but they are interacting with each other. Now when ever i run the code i am getting these errors can any body tell me what are they and how to solve them
Attachment 9935
I cannot read the error messages but I can tell you they are not from running your program. Your program has not built.
You can copy the actual text from the Compile Output or Issues pane in Qt Creator and paste it here (try right-clicking).
Quote:
C:/Users/user/Desktop/Pankaj/debug/safety.o:-1: error: In function `Z4qAbsIdET_RKS0_':
Quote:
C:/Users/user/Desktop/Pankaj/debug/safety.o:-1: error: In function `Z4qAbsIdET_RKS0_':
Quote:
C:/Users/user/Desktop/Pankaj/debug/safety.o:-1: error: In function `Z4qAbsIdET_RKS0_':
The code is not even building upQuote:
:-1: error: collect2: ld returned 1 exit status
Go to the compile output tab and paste the full error.
Compilation seems to have worked but you are getting errors at the linker stage.
Cheers,
_
here is compile outputQuote:
Running build steps for project SSMF_C++...
Configuration unchanged, skipping QMake step.
Starting: C:/Qt/2009.02/mingw/bin/mingw32-make.exe debug -w
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: Entering directory `C:/Users/user/Desktop/Pankaj'
C:/Qt/2009.02/mingw/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[1]: Entering directory `C:/Users/user/Desktop/Pankaj'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\SSMF_C++.exe debug/main.o debug/mainwindow.o debug/route.o debug/safety.o debug/moc_mainwindow.o -L"c:\Qt\2009.02\qt\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
mingw32-make.exe[1]: Leaving directory `C:/Users/user/Desktop/Pankaj'
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: Leaving directory `C:/Users/user/Desktop/Pankaj'
debug/safety.o(.data+0x0): In function `Z4qAbsIdET_RKS0_':
C:/Users/COMP2/Desktop/Pankaj/PankajWithSafety/integaerated/Pankaj/safety.cpp: multiple definition of `PI'
debug/route.o(.data+0x0):C:/Users/COMP2/Desktop/Pankaj/PankajWithSafety/integaerated/Pankaj/route.cpp: first defined here
debug/safety.o(.bss+0x0): In function `Z4qAbsIdET_RKS0_':
C:/Users/COMP2/Desktop/Pankaj/PankajWithSafety/integaerated/Pankaj/safety.cpp: multiple definition of `REARTH'
debug/route.o(.bss+0x0):C:/Users/COMP2/Desktop/Pankaj/PankajWithSafety/integaerated/Pankaj/route.cpp: first defined here
debug/safety.o(.bss+0x8): In function `Z4qAbsIdET_RKS0_':
C:/Users/COMP2/Desktop/Pankaj/PankajWithSafety/integaerated/Pankaj/safety.cpp: multiple definition of `DEG_TO_RAD'
debug/route.o(.bss+0x8):C:/Users/COMP2/Desktop/Pankaj/PankajWithSafety/integaerated/Pankaj/route.cpp:52: first defined here
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [debug\SSMF_C++.exe] Error 1
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: *** [debug] Error 2
Exited with code 2.
Error while building project SSMF_C++
When executing build step 'Make'
Oh there i got the problem because of multiple definitions os some variable
Yes, should be pretty straight forward to not do that then.
Cheers,
_