Problem with POCO_DISABLE_INTERNAL_OPENSSL=false on Windows #4285
Unanswered
Mike-Altwy
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The way headers are written and organized, it is not possible at the moment to compile with this #define (I have retrieved, and updated for 7z 23.01 and VS2022, the https://github.com/pocoproject/openssl repo, that I successfully built and placed inside Poco root folder).
However, when compiling Crypto for example, I get the "External OpenSSL defined but internal headers used - possible mismatch!" message. And it is kind of normal since if we look at the header files, we have (for example when compiling Cipher.cpp):
#include "Poco/Crypto/Cipher.h"
First include in this header is
#include "Poco/Crypto/Crypto.h"
then in Crypto.h we have at the top of the file:
#define POCO_EXTERNAL_OPENSSL_SLPRO 2
and then
#include "Poco/Foundation.h"
which immediately does:
#include "Poco/Config.h"
In Config.h we have:
#if !defined(POCO_EXTERNAL_OPENSSL) && defined(POCO_EXTERNAL_OPENSSL_SLPRO)
#define POCO_EXTERNAL_OPENSSL POCO_EXTERNAL_OPENSSL_SLPRO
#endif
And then with these two lines, although I am launching CMake with POCO_DISABLE_INTERNAL_OPENSSL=false, we have POCO_EXTERNAL_OPENSSL which is now #defined. Then we go back to Crypto.h and the block of code which performs all the #pragma comment(lib, ...) fail with the above message.
For the moment, I have moved the whole block of #pragma comment above #include "Poco/Foundation.h".
Is this the right way to fix the issue or maybe there is something I overlooked?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions