Results 1 to 5 of 5

Thread: Compile issues - collect2: ld returned 5 exit status

  1. #1
    Join Date
    Sep 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Compile issues - collect2: ld returned 5 exit status

    I am having issue trying to get this compile to work. I am running on Windows7 64-bit, VS2010 Premium, Qt Creator 2.3.0. Here is the output:

    Running build steps for project src...
    Configuration unchanged, skipping qmake step.
    Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe"
    C:/QtSDK/mingw/bin/mingw32-make -f Makefile.Release
    mingw32-make[1]: Entering directory `C:/Users/Shawn/mudlet/src'
    g++ -Wl,-s -mthreads -Wl,-subsystem,windows -o release\mudlet.exe object_script.mudlet.Release -L"c:\QtSDK\Desktop\Qt\4.7.4\mingw\lib" -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 -lqtmain -Lc:\mudlet2_package -llua51 -lpcre -lhunspell -lyajl -lphonon4 -lQtOpenGL4 -lQtNetwork4 -lQtUiTools -LC:\OpenSSL-Win32_full\lib -lQtXml4 -lQtGui4 -lQtCore4
    mingw32-make[1]: Leaving directory `C:/Users/Shawn/mudlet/src'
    collect2: ld returned 5 exit status
    mingw32-make[1]: *** [release\mudlet.exe] Error 1
    mingw32-make: *** [release] Error 2
    The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
    Error while building project src (target: Desktop)
    When executing build step 'Make'

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Compile issues - collect2: ld returned 5 exit status

    I am running on Windows7 64-bit, VS2010 Premium
    mingw32-make
    Something doesn't add up.
    You say you work with visual studio, but your compiler output is from MinGW...
    You can't mix the two.
    Either use the MS compiler, or MinGW.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Sep 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Compile issues - collect2: ld returned 5 exit status

    My mistake there. I don't know why I mentioned Visual Studio. I used VS to compile the dependent libraries for the project, but I am using QT to compile the project.

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Compile issues - collect2: ld returned 5 exit status

    I don't know why I mentioned Visual Studio. I used VS to compile the dependent libraries for the project, but I am using QT to compile the project.
    Not good since the binaries don't match.
    Compile all your binaries with the same compiler.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Sep 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Compile issues - collect2: ld returned 5 exit status

    Do the include libraries have to be compiled with the same compiler? The reason I ask is not all of the include libraries have a makefile for cmake. Some just have one for visual studio?

Similar Threads

  1. collect2: ld returned 1 exit status
    By qtnewbie123 in forum Installation and Deployment
    Replies: 9
    Last Post: 12th July 2011, 18:51
  2. collect2: ld returned 1 exit status
    By Cucus in forum Installation and Deployment
    Replies: 2
    Last Post: 23rd March 2011, 15:45
  3. Collect2:Id Returned 1 exit status
    By c_srikanth1984 in forum Qt Programming
    Replies: 9
    Last Post: 14th February 2010, 04:58
  4. collect2: ld returned 1 exit status
    By assismvla in forum Qt Programming
    Replies: 1
    Last Post: 25th May 2009, 01:51

Tags for this Thread

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.