Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-110743

Cannot link bundled zlib functions on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.3.1, 6.4.2, 6.5.0 Beta2
    • Core: Other
    • None
    • Windows

    Description

      Functions (e.g. gzdopen) in a bundled zlib cannot be linked.
       
      Qt 6.3.0 : OK
      Qt 6.3.1 and later : NG
      OS : Windows 11 Pro 22621.1105
      Compiler : Visual Studio 2019 Community
       
      Below is error message :

              link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /OPT:ICF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:release\zlibtest.exe @C:\Users\iori_\AppData\Local\Temp\nmF070.tmp
      main.obj : error LNK2019: 未解決の外部シンボル __imp_z_gzdopen が関数 main で参照されました
      release\zlibtest.exe : fatal error LNK1120: 1 件の未解決の外部参照
      NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.EXE"' : リターン 
      コード '0x460'
      Stop.
      NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\nmake.exe"' : リターン コード '0x2'
      Stop. 

       
      Below is sample code :
      main.cpp

      #include <stdio.h>
      #include <zlib.h>
      int main()
      {
          printf("zlib build test, Qt=%s\n", QT_VERSION_STR);
          gzdopen(0, "r");
          return 0;
      } 

      zlibtest.pro

      CONFIG += c++11 cmdline
      SOURCES += main.cpp
      INCLUDEPATH += $$[QT_INSTALL_PREFIX]/include/QtZlib 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            ioriayane Takayuki Orito
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes