You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The instructions for manually building on Windows do not cover certain CMake variables that affect the success of OpenSSL configuration in GameNetworkingSockets.
If you are linking statically with OpenSSL you will need to set OPENSSL_USE_STATIC_LIBS to ON.
If you are using a static runtime you will need to set OPENSSL_MSVC_STATIC_RT to ON.
Both need to be set before any calls to find_package(OpenSSL REQUIRED).
Otherwise the error noted in #118 (Cannot find EVP_MD_CTX_free) will occur. CMake does not report mismatched settings so it can be difficult to diagnose.
I don't know of any way to detect how binary-only libraries were configured so it's probably not possible to check if they're compatible, but FindOpenSSL does provide an OPENSSL_VERSION variable which may be an alternative to checking for the function that causes the error. This would eliminate the problem happening at configure time, but mixing runtimes will likely cause problems later on anyway.
Setting OPENSSL_MSVC_STATIC_RT to the value of MSVC_CRT_STATIC should help to avoid problems with incompatible runtimes.
The text was updated successfully, but these errors were encountered:
SamVanheer
changed the title
Update manual windows building instructions to refer to OpenSSL CMake documentation
Set OPENSSL_MSVC_STATIC_RT to value of MSVC_CRT_STATIC and update manual windows building instructions
Jun 13, 2022
The instructions for manually building on Windows do not cover certain CMake variables that affect the success of OpenSSL configuration in GameNetworkingSockets.
If you are linking statically with OpenSSL you will need to set
OPENSSL_USE_STATIC_LIBS
toON
.If you are using a static runtime you will need to set
OPENSSL_MSVC_STATIC_RT
toON
.Both need to be set before any calls to
find_package(OpenSSL REQUIRED)
.Otherwise the error noted in #118 (Cannot find EVP_MD_CTX_free) will occur. CMake does not report mismatched settings so it can be difficult to diagnose.
See https://cmake.org/cmake/help/latest/module/FindOpenSSL.html for the documentation for these variables, as well as any other variables that may be added in the future.
I don't know of any way to detect how binary-only libraries were configured so it's probably not possible to check if they're compatible, but FindOpenSSL does provide an
OPENSSL_VERSION
variable which may be an alternative to checking for the function that causes the error. This would eliminate the problem happening at configure time, but mixing runtimes will likely cause problems later on anyway.Setting
OPENSSL_MSVC_STATIC_RT
to the value ofMSVC_CRT_STATIC
should help to avoid problems with incompatible runtimes.The text was updated successfully, but these errors were encountered: