Qt5.1.1 build with openSSL option gives link error
-
Hi,
When building Qt5.1.1 x64 for vs2010 with the openssl option, I get the following building errors:
....
Thu, Dec 05 2013 17:43:23 Qt5Networkd_resource.rc
Thu, Dec 12 2013 16:42:59 .obj\debug_shared\Qt5Networkd_resource.res
....\lib\Qt5Networkd.dll target does not exist
echo 2 /* CREATEPROCESS_MANIFEST_RESOURCE_ID / 24 / RT_MANIFEST */ "..\..\lib\Qt5Networkd.dll.embed.manifest">....\lib\Qt5Networkd.dll_manifest.rc
if not exist ....\lib\Qt5Networkd.dll if exist ....\lib\Qt5Networkd.dll.embed.manifest del ....\lib\Qt5Networkd.dll.embed.manifest
if exist ....\lib\Qt5Networkd.dll.embed.manifest copy /Y ....\lib\Qt5Networkd.dll.embed.manifest ....\lib\Qt5Networkd.dll_manifest.bak
link /NOLOGO /DYNAMICBASE /NXCOMPAT /LIBPATH:â??C:\Qt\src\icu\lib64â?³ /BASE:0x64000000 /DEBUG /DLL /VERSION:5.11 /MANIFEST /MANIFESTFILE:....\lib\Qt5Networkd.dll.embed.manifest /OUT:....\lib\Qt5Networkd.dll @C:\Users\BJORN
.STU\AppData\Local\Temp\nm2E78.tmp
Creating library ....\lib\Qt5Networkd.lib and object ....\lib\Qt5Networkd.exp
moc_qnetworkreplyhttpimpl_p.obj : error LNK2001: unresolved external symbol "public: bool __cdecl QSslCertificate::operator==(class QSslCertificate const &)const " (??8QSslCertificate@@QEBA_NAEBV0@@Z)
...For unknown reasons he cannot find the QSslCertificate object for linking. I installed the binaries (Win64 OpenSSL v1.0.1e) from http://slproweb.com/products/Win32OpenSSL.html. The include and lib paths are also set in the env vars INCLUDE and LIB.
This is my configure:
configure -debug-and-release -opengl desktop -confirm-license -nomake examples -nomake tests -icu -I c:\Qt\src\icu\include -L c:\Qt\src\icu\lib64 -platform win32-msvc2010 -openssl -openssl-linked -I c:\OpenSSL-Win64
\include -L C:\OpenSSL-Win64\lib\VC\static OPENSSL_LIBS="-lUser64 -lAdvapi64 -lGdi64" OPENSSL_LIBS_DEBUG="-lssleay64MDd -llibeay64MDd" OPENSSL_LIBS_RELEASE="-lssleay64MD -llibeay64MD" -vcproj -commercial -prefixAnd I use jom for building. But when I build without the openssl option, the build is successfully and I can use the binaries.
Hopefully someone else sees what is going wrong here.
Thank you,
-
Hi,
Apparently the solution was to start from a clean git branch again.
git clean -dfx
-
Hi and welcome to devnet,
Indeed, every time you reconfigure Qt, you need to start the build from a clean tree. You should have had a warning for that at the end of the configuration step, didn't you ?
-
Hi,
Yes there is a warning at the end of the configure.
...
Generating Makefiles...Qt is now configured for building. Just run nmake.
To reconfigure, run nmake confclean and configure.
...And I used nmake confclean and clean with every reconfig but apparently that wasn't enough to clean the whole tree.
/*edit typo
-
What you can also do is use an out of source build. This way you don't pollute the source tree and confclean should work as expected
-
That could indeed be the case. Thank you for the tip.
-
You're welcome !
You should also consider updating to 5.2.
Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)