OpenSSL compile error

Hello,
After i include “openssl/hmac.h” file in my c++ class when i try to compile I’ve this error :

CompilerResultsLog:Error: Error
\Engine\Source\ThirdParty\OpenSSL\1.0.2g\include\Win64\VS2015\openssl/ossl_typ.h(172)
: error C2365: ‘UI’: redefinition;
previous definition was ‘namespace’
CompilerResultsLog:Error: Error
\engine\source\runtime\coreuobject\public\UObject/ObjectMacros.h(752)
: note: see declaration of ‘UI’

Other classes such as openssl/sha.h works good and i can use them…

2 Likes

I found the solution, maybe help someone in future :
We just need add this to our ccp file when we want to include any files that have conflict with engine variables…

#define UI UI_ST
THIRD_PARTY_INCLUDES_START
#include "openssl/hmac.h"
THIRD_PARTY_INCLUDES_END
#undef UI
6 Likes

thanks! This solved my issue!

6 years later : Thank you :pray:

Helped me a lot as well. Thanks!!