unresolved external symbol from openssl, QT 5.8, visual studio 2015
-
I am using the following configure line to compile QT 5.8 shared with visual studio 2015,
..\configure -confirm-license -prefix %QT_DIST% -mp -debug-and-release -icu -system-sqlite -I C:\Dev\dependencies\sqlite3\include -L C:\Dev\dependencies\sqlite3\lib -sql-odbc -sql-psql -I C:\Dev\postgresql\x64\include -L C:\Dev\postgresql\x64\lib -sql-mysql -I C:\Dev\mysql\x64\include -L C:\Dev\mysql\x64\lib -system-zlib -I C:\Dev\dependencies\zlib\include -L C:\Dev\dependencies\zlib\lib -system-libjpeg -I C:\Users\nameless\Documents\Works\Compiling\jpeg-9b -L C:\Users\nameless\Documents\Works\Compiling\jpeg-9b -system-libpng -I C:\Users\nameless\Documents\Works\Deps\x64\VS2015\libpng\Static\Debug\include -L C:\Users\nameless\Documents\Works\Deps\x64\VS2015\libpng\Static\Debug\lib -gif -ico -v -icu -qt-pcre -qt-freetype -nomake tests -opensource -openssl-linked -I C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Static\Debug\include -L C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Static\Debug\lib
But it got stuck when linking the openssl libraries :
Creating library ..\..\lib\Qt5Networkd.lib and object ..\..\lib\Qt5Networkd.exp libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_GetProcessWindowStation referenced in function OPENSSL_isservice libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_GetUserObjectInformationW referenced in function OPENSSL_isservice libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_MessageBoxW referenced in function OPENSSL_showfatal libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_CreateCompatibleBitmap referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_DeleteObject referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceCaps referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetDIBits referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetObjectW referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetDC referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_ReleaseDC referenced in function readscreen ..\..\lib\Qt5Networkd.dll : fatal error LNK1120: 10 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x460' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.
Normally when i was compiling on 5.7.x i have just added "-l Gdi32 -l User32" to the configure line but as currently the new build system is not allowed such practice how to get around these linking error?.
The openssl libs alread statically debug linked with those libraries, here is excerpt from the nt.mak openssl :
EX_LIBS=ws2_32.lib gdi32.lib advapi32.lib crypt32.lib user32.lib
-
I am using the following configure line to compile QT 5.8 shared with visual studio 2015,
..\configure -confirm-license -prefix %QT_DIST% -mp -debug-and-release -icu -system-sqlite -I C:\Dev\dependencies\sqlite3\include -L C:\Dev\dependencies\sqlite3\lib -sql-odbc -sql-psql -I C:\Dev\postgresql\x64\include -L C:\Dev\postgresql\x64\lib -sql-mysql -I C:\Dev\mysql\x64\include -L C:\Dev\mysql\x64\lib -system-zlib -I C:\Dev\dependencies\zlib\include -L C:\Dev\dependencies\zlib\lib -system-libjpeg -I C:\Users\nameless\Documents\Works\Compiling\jpeg-9b -L C:\Users\nameless\Documents\Works\Compiling\jpeg-9b -system-libpng -I C:\Users\nameless\Documents\Works\Deps\x64\VS2015\libpng\Static\Debug\include -L C:\Users\nameless\Documents\Works\Deps\x64\VS2015\libpng\Static\Debug\lib -gif -ico -v -icu -qt-pcre -qt-freetype -nomake tests -opensource -openssl-linked -I C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Static\Debug\include -L C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Static\Debug\lib
But it got stuck when linking the openssl libraries :
Creating library ..\..\lib\Qt5Networkd.lib and object ..\..\lib\Qt5Networkd.exp libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_GetProcessWindowStation referenced in function OPENSSL_isservice libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_GetUserObjectInformationW referenced in function OPENSSL_isservice libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_MessageBoxW referenced in function OPENSSL_showfatal libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_CreateCompatibleBitmap referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_DeleteObject referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceCaps referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetDIBits referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetObjectW referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetDC referenced in function readscreen libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_ReleaseDC referenced in function readscreen ..\..\lib\Qt5Networkd.dll : fatal error LNK1120: 10 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x460' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.
Normally when i was compiling on 5.7.x i have just added "-l Gdi32 -l User32" to the configure line but as currently the new build system is not allowed such practice how to get around these linking error?.
The openssl libs alread statically debug linked with those libraries, here is excerpt from the nt.mak openssl :
EX_LIBS=ws2_32.lib gdi32.lib advapi32.lib crypt32.lib user32.lib
-
@mrjj said in unresolved external symbol from openssl, QT 5.8, visual studio 2015:
Gdi32.lib
Looks like for odd reasons, it seems gdi32.lib not statically linked into libeay32.lib, here is the full dumped of symbols my self compiled openssl.
My steps to compiled static debug openssl is fairly simple :
path=C:\Users\nameless\Documents\Tools\Nasm\x64;%PATH%; perl Configure debug-VC-WIN64A --prefix=C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Static\Debug no-shared experimental-jpake enable-md2 enable-rc5 enable-rfc3779 enable-ssl-trace enable-static-engine ms\do_win64a nmake -f ms\nt.mak nmake -f ms\nt.mak install