Results 1 to 6 of 6

Thread: Linker error after clean install

  1. #1
    Join Date
    Feb 2010
    Posts
    20
    Qt products
    Qt4
    Platforms
    Windows

    Default Linker error after clean install

    Hello all.

    I just installed the latest version of qt sdk, along with the qt creator ide. I start by creating an empty qt gui application, from the templates. When i try to build, i get the following output:

    Qt Code:
    1. Running build steps for project dok...
    2. Starting: c:/qt/2010.01/qt/bin/qmake.exe H:/Projects/Qt Creator/dok/dok.pro -spec win32-g++ -r
    3. Exited with code 0.
    4. Starting: C:/MinGW/bin/mingw32-make.exe -w
    5. C:\MinGW\bin\mingw32-make.exe: Entering directory `H:/Projects/Qt Creator/dok'
    6. C:/MinGW/bin/mingw32-make.exe -f Makefile.Debug
    7. mingw32-make.exe[1]: Entering directory `H:/Projects/Qt Creator/dok'
    8. g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\dok.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o -L"c:\Qt\2010.01\qt\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
    9. mingw32-make.exe[1]: Leaving directory `H:/Projects/Qt Creator/dok'
    10. C:\MinGW\bin\mingw32-make.exe: Leaving directory `H:/Projects/Qt Creator/dok'
    11. c:\Qt\2010.01\qt\lib/libqtmaind.a(qtmain_win.o)(.text+0x64):../../include/QtCore/../../src/corelib/tools/qvector.h:410: undefined reference to `_Unwind_Resume'
    12. c:\Qt\2010.01\qt\lib/libqtmaind.a(qtmain_win.o)(.text+0x12a):C:\qt-greenhouse\Trolltech\Code_less_create_more\Trolltech\Code_less_create_more\Troll\4.6\qt\src\winmain/qtmain_win.cpp:135: undefined reference to `_Unwind_Resume'
    13. c:\Qt\2010.01\qt\lib/libqtmaind.a(qtmain_win.o)(.text$_ZN7QVectorIPcE7reallocEii[QVector<char*>::realloc(int, int)]+0x1a1):../../include/QtCore/../../src/corelib/tools/qvector.h:482: undefined reference to `_Unwind_Resume'
    14. c:\Qt\2010.01\qt\lib/libqtmaind.a(qtmain_win.o)(.text$_ZN7QVectorIPcE7reallocEii[QVector<char*>::realloc(int, int)]+0x1dc):../../include/QtCore/../../src/corelib/tools/qvector.h:483: undefined reference to `_Unwind_Resume'
    15. c:\Qt\2010.01\qt\lib/libqtmaind.a(qtmain_win.o)(.eh_frame+0x12): In function `Z4qMinIiERKT_S2_S2_':
    16. ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:95: undefined reference to `__gxx_personality_v0'
    17. collect2: ld returned 1 exit status
    18. mingw32-make.exe[1]: *** [debug\dok.exe] Error 1
    19. C:\MinGW\bin\mingw32-make.exe: *** [debug] Error 2
    20. Exited with code 2.
    21. Error while building project dok
    22. When executing build step 'Make'
    To copy to clipboard, switch view to plain text mode 

    any ideas please? I think i have everything correctly set up.

    My OS is windows 7.

    thanks in advance

  2. #2
    Join Date
    Aug 2008
    Posts
    29
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linker error after clean install

    I have exactly the same problem with qt-sdk-win-opensource-2010.02.1 on winVista 32bit. But only with certain projects, others link cleanly. Neither rebuilding qtmain_win.a nor a full reinstall of Qt+mingw changes the situation.

    This is a significant bug, somebody at Qt please review!

    I will let you all know if I find a workaround.

    -- Tom

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Linker error after clean install

    To me, that smells of libstdc++ not being linked with your code.

    Can you upload the project somewhere?

  4. #4
    Join Date
    Aug 2008
    Posts
    29
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linker error after clean install

    The problem is apparently due to the fact that Qt compiles the 4.6 libraries with gcc 4.4 but still ships the Windows opensource sdk with gcc 3.5. It can be fixed by upgrading MinGW to gcc 4.4, which is easy enough to do; but don't you think Qt should do that and ship a working sdk?

    I do, and have reported this as a packaging bug on the Qt tracker.

    -- Tom

  5. #5
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Linker error after clean install

    The SDK works out of the box and ships with GCC 4.4.

    Maybe you also have GCC 3.5 somewhere and QtCreator is using that because it has a higher priority in your path?

  6. #6
    Join Date
    Aug 2008
    Posts
    29
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linker error after clean install

    You are right. I do have another MinGW installation, and it was gcc 3.5 until I upgraded it recently. I just reinstalled the MinGW from qt-sdk-win-opensource-2010.02.1.exe and have verified that it is indeed gcc 4.4. So I must have been running the other compiler. Sorry for the fuss.

    -- Tom

Similar Threads

  1. Qt Help Missing on Clean Install
    By HyperB in forum Installation and Deployment
    Replies: 0
    Last Post: 1st May 2009, 08:08
  2. Linker error
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 14th July 2008, 14:30
  3. How to clean my Mac opensource install?
    By cb in forum Installation and Deployment
    Replies: 3
    Last Post: 28th September 2007, 22:22
  4. Linker error
    By alfblt16 in forum Qt Programming
    Replies: 2
    Last Post: 28th September 2006, 09:20
  5. Linker Error
    By ankurjain in forum Qt Programming
    Replies: 2
    Last Post: 5th April 2006, 05:45

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
  •  
Qt is a trademark of The Qt Company.