Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Moc link error against zlib: Windows 7 32-bit, Opensource Qt5+ shared, VS2010
kerry last edited by
Hello! I've been burning a few hours a day on this for a while, have been building and using Qt for years, but I've been unable to bring up any Qt5.0-5.2 version due to this same link error. I've only found one post with exact same error message and similar config (http://qt-project.org/forums/viewthread/28091), but I'm already doing what he was told to do.
Prebuilt OpenSSL & ICU in VS2010, have installed Postgres 2010 binaries.
configure -opensource -debug-and-release -mp -openssl -opengl desktop -nomake tests -confirm-license -icu -qt-sql-psql -qt-sql-odbc -qt-sql-sqlite -qt-zlib -platform win32-msvc2010 -I D:\Dev\VScapePlatform\Public\Third-Party\OpenSSL\1.0.1e_x86\include -L D:\Dev\VScapePlatform\Public\Third-Party\OpenSSL\1.0.1e_x86\build\bin -I D:\Dev\VScapePlatform\Public\Third-Party\ICU\51.2\icu\include -L D:\Dev\VScapePlatform\Public\Third-Party\ICU\51.2\icu\bin -L D:\pgsql\bin -I D:\pgsql\include
The link error:
link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "
/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' versio
n='220.127.116.11' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture
=''" /MANIFEST /MANIFESTFILE:......\bin\moc.exe.embed.manifest /OUT:......
Qt5Bootstrap.lib(qbytearray.obj) : error LNK2019: unresolved external symbol _un
compress referenced in function "class QByteArray __cdecl qUncompress(unsigned c
har const *,int)" (?qUncompress@@YA?AVQByteArray@@PBEH@Z)
Qt5Bootstrap.lib(qbytearray.obj) : error LNK2019: unresolved external symbol _co
mpress2 referenced in function "class QByteArray __cdecl qCompress(unsigned char
const *,int,int)" (?qCompress@@YA?AVQByteArray@@PBEHH@Z)
......\bin\moc.exe : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\link.EXE"' : return code '0x460'
Other than specifying '-qt-zlib', how do I help my system find zlib? I see qt zlib in 3rdparty, and files compile against its headers, but I don't see where zlib itself is compiled or specified as a link dependency (though I haven't spent time learning much about qt build environment, its always just worked for me and my team...) Could also be cdecl vs. stdcall issue, but I haven't touched anything in qt tree before build.
Driving me nuts, greatly appreciate any pointers...
kerry last edited by
Have code compiling now, by changing:
- I had missed the decision to drop ICU, now removed from build
- Build Postgres driver AFTER main build, NOT WITH main build.