I want to get openssl running with CLion (CMake) on my Mac.
Installed openssl with homebrew
brew install openssl
But still CLion is unable to find openssl. In the past it was possible to use
brew link openssl
but it seems that today this is refused by homebrew.
Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
Then I used following cmake options in CLion (CMakeLists.txt)
set(I "/usr/local/opt/openssl/include")
set(L "/usr/local/opt/openssl/lib")
include_directories(${I})
But still I get:
Undefined symbols for architecture x86_64:
"_EVP_DigestSignFinal", referenced from:
Undefined symbols for architecture x86_64:
"_EVP_DigestSignFinal", referenced from:
OpenSSL::signMsg(Buffer, Buffer, SignOptions) in libMyLib.a(ssl_state.cpp.o)
OpenSSL::signMsg(Buffer, Buffer, SignOptions) in libMyLib.a(ssl_state.cpp.o)
Nearly everything I could find to this thematic was about older versions of macOS, but Apple has removed development-headers from openssl 0.9.8, so many guides does not work anymore.