Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rockspec support static OpenSSL on Windows #81

Open
moteus opened this issue Sep 8, 2016 · 6 comments
Open

Rockspec support static OpenSSL on Windows #81

moteus opened this issue Sep 8, 2016 · 6 comments

Comments

@moteus
Copy link

moteus commented Sep 8, 2016

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

@martingonzalez123
Copy link

Hi can you help me with this error how you solved it? i need to include these libraries ? where? in my configure where?

@moteus
Copy link
Author

moteus commented Oct 1, 2016

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

@brunoos
Copy link
Member

brunoos commented Oct 2, 2016

I don't use Windows...
Has anyone technical argument about to include these library in rockspec?

@momofarm
Copy link

momofarm commented Nov 5, 2016

must lost some include/lib setting in project file, all the APIs he mentioned are windows native one.

@moteus
Copy link
Author

moteus commented Nov 5, 2016

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.

@brunoos
Copy link
Member

brunoos commented Nov 6, 2016

Would It be better to create two rockspec? (one static linkage and other for dll)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants