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

OpenSSL wrap is not usable as shared library with MSVC #1288

Closed
QuLogic opened this issue Nov 17, 2023 · 3 comments
Closed

OpenSSL wrap is not usable as shared library with MSVC #1288

QuLogic opened this issue Nov 17, 2023 · 3 comments

Comments

@QuLogic
Copy link
Member

QuLogic commented Nov 17, 2023

When building with MSVC, it fails to find crypto.lib if linking to a shared library version of OpenSSL. I believe this occurs when no symbols are exported. From what I can tell of upstream, you would need to define _WINDLL in order for it to export symbols: https://github.com/openssl/openssl/blob/cf6342bc024868f5a55f2225f2e083415fb1329a/include/openssl/e_os2.h#L97-L98

@QuLogic
Copy link
Member Author

QuLogic commented Nov 17, 2023

If I add _WINDLL to:

defines += [
## default of Win. See INSTALL in openssl repo.
'OPENSSLDIR="C:\\Program Files\\Common Files\\SSL"',
'ENGINESDIR="NUL"',
'MODULESDIR="NUL"',
'OPENSSL_SYS_WIN32', 'WIN32_LEAN_AND_MEAN', 'L_ENDIAN',
'_CRT_SECURE_NO_DEPRECATE', 'UNICODE', '_UNICODE',
]

then crypto.lib is produced, but then when linking ssl.dll, I get:

subprojects\openssl-3.0.8\ssl.dll : fatal error LNK1120: 495 unresolved externals

I'm not sure if that's an upstream problem, or if that's not the right place in the Meson overlay.

@QuLogic
Copy link
Member Author

QuLogic commented Nov 17, 2023

Perhaps _WINDLL does (next-to-)nothing, and this mkdef.pl is what produces the linker script to export symbols.

@QuLogic
Copy link
Member Author

QuLogic commented Nov 17, 2023

I could've sworn I searched for this before, but it's a duplicate of #181. I'll try the linked #1283.

@QuLogic QuLogic closed this as completed Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant