Results 1 to 6 of 6

Thread: How to solve this error

  1. #1
    Join Date
    Dec 2012
    Posts
    45
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Default How to solve this error

    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
    error_screen.jpg

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to solve this error

    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).

  3. #3
    Join Date
    Dec 2012
    Posts
    45
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: How to solve this error

    C:/Users/user/Desktop/Pankaj/debug/safety.o:-1: error: In function `Z4qAbsIdET_RKS0_':
    C:/Users/user/Desktop/Pankaj/debug/safety.o:-1: error: In function `Z4qAbsIdET_RKS0_':
    C:/Users/user/Desktop/Pankaj/debug/safety.o:-1: error: In function `Z4qAbsIdET_RKS0_':
    :-1: error: collect2: ld returned 1 exit status
    The code is not even building up

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to solve this error

    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,
    _

  5. #5
    Join Date
    Dec 2012
    Posts
    45
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: How to solve this error

    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'
    here is compile output

    Oh there i got the problem because of multiple definitions os some variable

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to solve this error

    Yes, should be pretty straight forward to not do that then.

    Cheers,
    _

Similar Threads

  1. What is this error and how to solve it?
    By satya@sipl in forum Newbie
    Replies: 3
    Last Post: 26th July 2012, 08:04
  2. How to solve gmake error?
    By robertchoi in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 1st February 2012, 04:17
  3. how to solve the ld error: library not found for -lqwt ?
    By josentop in forum Qt Programming
    Replies: 3
    Last Post: 4th January 2012, 14:06
  4. How can I solve this?
    By srohit24 in forum Qt Programming
    Replies: 8
    Last Post: 7th April 2009, 07:00
  5. start application: Why this error and how to solve it?
    By Colx007 in forum Qt Programming
    Replies: 1
    Last Post: 21st January 2008, 15:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.