8000 Include Crypto.h in NetSSL.h to avoid missing link lib link error by zosrothko · Pull Request #2170 · pocoproject/poco · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Include Crypto.h in NetSSL.h to avoid missing link lib link error #2170

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

Merged
merged 2 commits into from
Feb 20, 2018
Merged

Include Crypto.h in NetSSL.h to avoid missing link lib link error #2170

merged 2 commits into from
Feb 20, 2018

Conversation

zosrothko
Copy link
Member

No description provided.

@aleks-f
Copy link
Member
aleks-f commented Feb 18, 2018

I guess I did not test NetSSL build. In any case, it's now a bit more complicated because we are naming those libraries differently, and there is no "md" version of them, see here how to do it right

@aleks-f
Copy link
Member
aleks-f commented Feb 18, 2018

but since NetSSL depends on crypto, as long as Crypto.h is included from somewhere, those pragmas should not be needed

@zosrothko
Copy link
Member Author

Those fixes on #pragma are needed otherwise in case of a link in debug mode, both libssl.lib /libssld.lib and libcrypto.lib/ libcryptod.lib are required, which is wrong. Only the libs suffixed by 'd' should be required

@aleks-f
Copy link
Member
aleks-f commented Feb 18, 2018

look at my first response again; what you have here wil only work for DLLs. it will not work for static, because libraries are not named libcrypto and libssl anymore; additionally, there is no eg. libryptomdd.lib. Just include Crypto.h from NetSSL.h and problem is solved.

@zosrothko
Copy link
Member Author

Added #include "Crypto.h" in NetSSL.h. But there are redondant definitions for the POCO_LIB_SUFFIX between Foundation.h and Crypto.h and IMO it could be simplified in Crypto.h.

@zosrothko zosrothko changed the title Use POCO_LIB_SUFFIX as suffix for libssl & libcrypto Added #include "Crypto.h" in NetSSL.h Feb 19, 2018
@zosrothko zosrothko changed the title Added #include "Crypto.h" in NetSSL.h Include Crypto.h in NetSSL.h to avoid missing link lib link error Feb 19, 2018
@aleks-f
Copy link
Member
aleks-f commented Feb 20, 2018

there are redondant definitions for the POCO_LIB_SUFFIX between Foundation.h and Crypto.h

Not sure what you mean - there's no POCO_LIB_SUFFIX definition in Crypto.h

it could be simplified in Crypto.h

POCO_LIB_SUFFIX is opaque - it does not do what we need for linking OpenSSL libraries, which have no md[d] incarnation, because static libs are only meant to be linked with static runtimes, hence only mt[d]

@aleks-f aleks-f merged commit f6f47d0 into pocoproject:develop Feb 20, 2018
@zosrothko zosrothko deleted the patch-4 branch February 22, 2018 17:46
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

Successfully merging this pull request may close these issues.

2 participants
0