luasec
luasec copied to clipboard
Rockspec support static OpenSSL on Windows
Just try build LuaSec with OpenSSL 1.0.2h and got:
Creating library ssl.lib and object ssl.exp
libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_DeregisterEventSource referenced in function OPENSSL_showfatal
libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_RegisterEventSourceW referenced in function OPENSSL_showfatal
libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_ReportEventW referenced in function OPENSSL_showfatal
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
ssl.dll : fatal error LNK1120: 13 unresolved externals
To resolve this deps need also ling against Advapi32.lib
, User32.lib
and Gdi32.lib
Hi can you help me with this error how you solved it? i need to include these libraries ? where? in my configure where?
you need add this to rockspec file there https://github.com/brunoos/luasec/blob/master/luasec-0.6-1.rockspec#L84 But it needs only if you link with static openssl. But i see no problem to do this in all cases
I don't use Windows... Has anyone technical argument about to include these library in rockspec?
must lost some include/lib setting in project file, all the APIs he mentioned are windows native one.
Yes its Windows only. And even need only if OpenSSL build as static library. Because by default is most likely that executable file links with this libs. But if this libs not loaded in host process and you try load this openssl dll you also get error.
Would It be better to create two rockspec? (one static linkage and other for dll)