Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
6.3.1, 6.4.2, 6.5.0 Beta2
-
None
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