[Interest] Can't build Qt 5.10 statically from source on Windows - fails to link with OpenSSL

Nuno Santos nunosantos at imaginando.pt
Fri Oct 27 13:48:15 CEST 2017


Hi,

Sorry to keep asking this but I can’t find the cause of this problem. I’m trying to build Qt 5.10 from git source. I’m using the following configure line:

configure -confirm-license -recheck -prefix c:\qt\5.10.0\msvc2015_5_10_0_static_32 -commercial -debug-and-release -static -static-runtime -opengl dynamic -openssl-linked -I c:\openssl-lib-1.0.2\include -L c:\openssl-lib-1.0.2\lib OPENSSL_LIBS_DEBUG="libeay32MTd.lib ssleay32MTd.lib" OPENSSL_LIBS_RELEASE="libeay32MT.lib ssleay32MT.lib" -qtnamespace com_imaginando_qt_5_10_32

I have tried with openssl 1.0.1, 1.0.2 and 1.1.0 but they are all generating the same errors...

cd qmltestrunner\ && ( if not exist Makefile C:\Qt\5.10.0\src\qtbase\bin\qmake.exe -o Makefile C:\Qt\5.10.0\src\qtdeclarative\tools\qmltestrunner\qmltestrunner.pro ) && C:\Qt\5.10.0\jom.exe -f Makefile
	C:\Qt\5.10.0\jom.exe -f Makefile.Release
	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='*'" /VERSION:5.10 /MANIFEST:embed /OUT:..\..\bin\qmltestrunner.exe @C:\Users\nsantos\AppData\Local\Temp\qmltestrunner.exe.3884.16.jom
   Creating library ..\..\bin\qmltestrunner.lib and object ..\..\bin\qmltestrunner.exp
Qt5Network.lib(qsslsocket_openssl_symbols.obj) : error LNK2019: unresolved external symbol _OPENSSL_sk_num referenced in function "int __cdecl com_imaginando_qt_5_10_32::q_OPENSSL_sk_num(struct stack_st *)" (?q_OPENSSL_sk_num at com_imaginando_qt_5_10_32@@YAHPAUstack_st@@@Z)

…

Qt5Network.lib(qsslsocket_openssl_symbols.obj) : error LNK2019: unresolved external symbol _DH_get0_pqg referenced in function "void __cdecl com_imaginando_qt_5_10_32::q_DH_get0_pqg(struct dh_st const *,struct bignum_st const * *,struct bignum_st const * *,struct bignum_st const * *)" (?q_DH_get0_pqg at com_imaginando_qt_5_10_32@@YAXPBUdh_st@@PAPBUbignum_st@@11 at Z)
..\..\bin\qmltestrunner.exe : fatal error LNK1120: 205 unresolved externals

Any suggestions? 

Thx!

Regards,

Nuno


More information about the Interest mailing list