Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. unresolved uncompress and compress2 symbols when building Qt 5.5.1 with MSVC2015

unresolved uncompress and compress2 symbols when building Qt 5.5.1 with MSVC2015

Scheduled Pinned Locked Moved Solved Installation and Deployment
build5.5.1msvc2015
6 Posts 2 Posters 5.0k Views
  • 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.
  • rkohserR Offline
    rkohserR Offline
    rkohser
    wrote on last edited by
    #1

    Hi all,

    I am currently struggling with a mistake I get when I am trying to compile Qt 5.5.1 with Visual Studio 2015. Here is my configure call, which works fine :

    configure -nomake examples -nomake tests -no-angle -opengl desktop > configure_output.txt 2>&1
    

    I use jom to build and I call jom clean before to clean the directory, and I systematically get the following mistakes :

    jom: C:\Qt\Qt5.5.1\qt\qtbase\src\tools\rcc\Makefile.Release [..\..\..\bin\rcc.exe] Error 1120
    	F:\SOUP_SOURCE\qt\jom\jom.exe -f Makefile.Release
    	cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -D_HAS_EXCEPTIONS=0 -MP -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -DUNICODE -DWIN32 -DWIN64 -DQT_RCC -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_BOOTSTRAP_LIB -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_SYSTEMLOCALE -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -DQT_NO_TRANSLATION -DNDEBUG -I. -IC:\ICU\include -IC:\PostgreSQL\9.5\include -I. -I..\..\..\include -I..\..\..\include\QtCore -I..\..\..\include\QtXml -I..\..\..\include\QtCore\5.5.1 -I..\..\..\include\QtCore\5.5.1\QtCore -I..\..\..\include\QtXml\5.5.1 -I..\..\..\include\QtXml\5.5.1\QtXml -I..\..\..\mkspecs\win32-msvc2015 -Fo.obj\release\ @F:\TEMP\rcc.obj.28556.16.jom
    rcc.cpp
    	cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -D_HAS_EXCEPTIONS=0 -MP -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -DUNICODE -DWIN32 -DWIN64 -DQT_RCC -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_BOOTSTRAP_LIB -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_SYSTEMLOCALE -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -DQT_NO_TRANSLATION -DNDEBUG -I. -IC:\ICU\include -IC:\PostgreSQL\9.5\include -I. -I..\..\..\include -I..\..\..\include\QtCore -I..\..\..\include\QtXml -I..\..\..\include\QtCore\5.5.1 -I..\..\..\include\QtCore\5.5.1\QtCore -I..\..\..\include\QtXml\5.5.1 -I..\..\..\include\QtXml\5.5.1\QtXml -I..\..\..\mkspecs\win32-msvc2015 -Fo.obj\release\ @F:\TEMP\main.obj.28556.16.jom
    main.cpp
    	link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:..\..\..\bin\rcc.exe @F:\TEMP\rcc.exe.28556.3635.jom
    Qt5Bootstrap.lib(qbytearray.obj) : error LNK2019: unresolved external symbol compress2 referenced in function "class QByteArray __cdecl qCompress(unsigned char const *,int,int)" (?qCompress@@YA?AVQByteArray@@PEBEHH@Z)
    Qt5Bootstrap.lib(qbytearray.obj) : error LNK2019: unresolved external symbol uncompress referenced in function "class QByteArray __cdecl qUncompress(unsigned char const *,int)" (?qUncompress@@YA?AVQByteArray@@PEBEH@Z)
    c:\zlib\lib\zdll.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
    ..\..\..\bin\rcc.exe : fatal error LNK1120: 2 unresolved externals
    jom: C:\Qt\Qt5.5.1\qt\qtbase\src\tools\rcc\Makefile [release] Error 2
    	link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:..\..\..\bin\moc.exe @F:\TEMP\moc.exe.31360.4321.jom
    Qt5Bootstrap.lib(qbytearray.obj) : error LNK2019: unresolved external symbol compress2 referenced in function "class QByteArray __cdecl qCompress(unsigned char const *,int,int)" (?qCompress@@YA?AVQByteArray@@PEBEHH@Z)
    Qt5Bootstrap.lib(qbytearray.obj) : error LNK2019: unresolved external symbol uncompress referenced in function "class QByteArray __cdecl qUncompress(unsigned char const *,int)" (?qUncompress@@YA?AVQByteArray@@PEBEH@Z)
    c:\zlib\lib\zdll.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
    ..\..\..\bin\moc.exe : fatal error LNK1120: 2 unresolved externals
    jom: C:\Qt\Qt5.5.1\qt\qtbase\src\tools\moc\Makefile.Release [..\..\..\bin\moc.exe] Error 1120
    jom: C:\Qt\Qt5.5.1\qt\qtbase\src\tools\moc\Makefile [release] Error 2
    jom: C:\Qt\Qt5.5.1\qt\qtbase\src\Makefile [sub-moc-make_first] Error 2
    jom: C:\Qt\Qt5.5.1\qt\qtbase\src\Makefile [sub-rcc-make_first] Error 2
    jom: C:\Qt\Qt5.5.1\qt\qtbase\Makefile [sub-src-make_first] Error 2
    jom: C:\Qt\Qt5.5.1\qt\Makefile [module-qtbase-make_first] Error 2
    
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      How did you setup the command line you are using ? It seems you are trying to build a 64bit configured Qt using the 32bit VS compiler.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • rkohserR Offline
        rkohserR Offline
        rkohser
        wrote on last edited by
        #3

        Hi,

        Here is the content of my "starter" prompt :

        CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
        SET _ROOT=c:\Qt\Qt5.5.1\qt
        SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;C:\ICU\bin64;%PATH%
        SET INCLUDE=%INCLUDE%;C:\icu\include;
        SET LIB=%LIB%;C:\icu\lib64;
        SET QMAKESPEC=win32-msvc2015
        SET _ROOT=
        

        Am I missing something ? amd64 should pick the 64bits compiler, right ?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Why do you have Qt and gnuwin32 in your PATH ? That looks suspicious, there's also no need for the QMAKESPEC. It should be automatically detected.

          IIRC, you should have in Visual Studio's Start menu a folder with links to prepared command line, that might help ensure the correct version is used. e.g. with Visual Studio 2013, for 64bit it's a cross-compiling shell that's proposed.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • rkohserR Offline
            rkohserR Offline
            rkohser
            wrote on last edited by rkohser
            #5

            About gnuwin32 and Qt in teh path, these instructions are directly coming from Qt documentation : see http://doc.qt.io/qt-5/windows-building.html

            I managed to build Qt with ICU, webkit and all the plugins by using the INCLUDE and LIBS variables in the prompt instead of in the configure call.
            When I started this thread my problem was that Qt kept linking with the system zlib installation, and this was coming from a former configuration that was not correctly cleaned, as the "confclean" nmake target does not work anymore in Qt 5.5.1.
            I deleted the whole directory, unzipped the source again and used the following prompt :

            CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
            SET _ROOT=c:\Qt\Qt5.5.1\qt
            SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;C:\ICU\bin64;c:\Qt\jom;%PATH%
            SET INCLUDE=%INCLUDE%;C:\icu\include;
            SET LIB=%LIB%;C:\icu\lib64;
            SET QMAKESPEC=win32-msvc2015
            SET _ROOT=
            

            with the following configure call :

            configure -prefix c:\Qt\Qt5.5.1\install\ -opensource -confirm-license -debug-and-release -c++11 -nomake examples -nomake tests -icu -no-angle -opengl desktop
            

            Webkit was built automatically as I had perl, python and ruby in my PATH.

            Thanks

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Glad you found out and thanks for sharing your findings !

              Thanks for the link, I've forgotten that page.

              What I usually do is an out of source build, so when there's something to change, you can just nuke the build folder and start fresh without to worry about what would need to be cleaned from the source tree.

              Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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