Skip to content
Advertisement

Unable to link openssl libraries to CLion C++ program

I have a CLion project. Here is my CMakeLists.txt:

JavaScript

And here is error that I get:

JavaScript

Advertisement

Answer

Maybe you should try link_libraries(ssl) instead of link_libraries(openssl), if you’re sure of openssl installed on your local machine. See https://wiki.openssl.org/index.php/Libcrypto_API , it says that “OpenSSL provides two primary libraries: libssl and libcrypto.”.

To fix your issue just add to your CMakeList.txt:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement