Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compile Qt 5.1.1 static on Windows XP - Linking ICU fails
Qt 6.11 is out! See what's new in the release blog

Compile Qt 5.1.1 static on Windows XP - Linking ICU fails

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 4.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nando76
    wrote on last edited by
    #1

    Hi,
    i am still trying to build Qt 5.1.1 static on my windows XP machine.

    I added -static -static-libgcc into qmake.conf for win32-g++ platform.

    Then i compiled ICU static from source and called:
    C:> set PATH=%PATH%;C:\icu\dist\lib
    C:> set INCLUDE=%INCLUDE%;C:\icu\dist\include
    C:> set LIB=%LIB%;C:\icu\dist\lib

    Everything is on the right place like above, but when i compile Qt linking against the ICU libs aborts compilation. It seems somehow the (existing) libs can not be found by linker....
    But they exist... Any ideas???

    Output:
    @mingw32-make[4]: Entering directory 'c:/Qt/qt-everywhere-opensource-src-5.1.1/qt-everywhere-opensource-src-5.1.1/qtbase/src/tools/uic'
    g++ -static -static-libgcc -Wl,-s -Wl,-subsystem,console -o ../../../bin/uic.exe object_script.uic.Release -LC:/Qt/icu/dist/lib -LC:/Qt/qt-everywhere-opensource-src-5.1.1/qt-everywhere-opensource-src
    -5.1.1/qtbase/lib -lQt5Core -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz -lsicuin -lsicuuc -lsicudt
    c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lsicuin
    c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lsicuuc
    c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lsicudt
    collect2.exe: error: ld returned 1 exit status
    Makefile.Release:105: recipe for target '../../../bin/uic.exe' failed
    mingw32-make[4]: *** [../../../bin/uic.exe] Error 1
    mingw32-make[4]: Leaving directory 'c:/Qt/qt-everywhere-opensource-src-5.1.1/qt-everywhere-opensource-src-5.1.1/qtbase/src/tools/uic'
    Makefile:34: recipe for target 'release' failed
    mingw32-make[3]: *** [release] Error 2
    mingw32-make[3]: Leaving directory 'c:/Qt/qt-everywhere-opensource-src-5.1.1/qt-everywhere-opensource-src-5.1.1/qtbase/src/tools/uic'
    Makefile:384: recipe for target 'sub-uic-make_first' failed
    mingw32-make[2]: *** [sub-uic-make_first] Error 2
    mingw32-make[2]: Leaving directory 'c:/Qt/qt-everywhere-opensource-src-5.1.1/qt-everywhere-opensource-src-5.1.1/qtbase/src'
    Makefile:41: recipe for target 'sub-src-make_first' failed
    mingw32-make[1]: *** [sub-src-make_first] Error 2
    mingw32-make[1]: Leaving directory 'c:/Qt/qt-everywhere-opensource-src-5.1.1/qt-everywhere-opensource-src-5.1.1/qtbase'
    makefile:56: recipe for target 'module-qtbase-make_first' failed
    mingw32-make: *** [module-qtbase-make_first] Error 2@

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nando76
      wrote on last edited by
      #2

      Ok.. i found that the naming is wrong.... The ICU libs are named: icuuc.lib but somehow Qt needs sicuuc.lib
      with prepending 's'....
      That solved the linking problem, but started a new one:

      uic.exe seems to be build dynamically and again complains about missing: @libgcc_s_sjlj-1.dll@ ??

      but qmake.conf for win32-g++ mkspecs has:
      @ QMAKE_LFLAGS = -static -static-libgcc@
      set...

      :(

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        I'm using vc2012 to compile qt, also ran into this problem while nmake.

        qapplicationargumentparser.cpp
        link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "
        /MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' versio
        n='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture
        ='
        '" /OUT:C:\qt-everywhere-opensource-src-5.1.1\qtbase\bin\xmlpatterns.exe @C:
        Users\Linear\AppData\Local\Temp\nm2790.tmp
        LINK : fatal error LNK1181: 無法開啟輸入檔 'sicuin.lib'
        NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 11.0\VC\BI
        N\link.EXE"' : 傳回碼 '0x49d'
        Stop.
        NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 11.0\VC\BI
        N\nmake.exe"' : 傳回碼 '0x2'
        Stop.
        NMAKE : fatal error U1077: 'cd' : 傳回碼 '0x2'
        Stop.
        NMAKE : fatal error U1077: 'cd' : 傳回碼 '0x2'
        Stop.
        NMAKE : fatal error U1077: 'cd' : 傳回碼 '0x2'
        Stop.

        Here's a step by step build guide using VS2012, if you're interested.
        "http://blog.csdn.net/ztz0223/article/details/8917182":http://blog.csdn.net/ztz0223/article/details/8917182

        I'm still following this guide try to make it built.

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          btw my environment is 32-bit windows 7 with vs2012 express

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved