I am using clion for my c++ project. The command I need to run is:
g++ server.cpp -L/usr/lib -lssl -lcrypto -o server
I have tried:
SET(GCC_COVERAGE_LINK_FLAGS "-L/usr/lib -lssl -lcrypto")
add_definitions(${GCC_COVERAGE_COMPILE_FLAGS})
as mentioned here
Also tried:
include_directories(/usr/inc)
link_directories(/usr/lib)
SET(GCC_COVERAGE_LINK_FLAGS "-lssl -lcrypto")
mentioned here.
Nothing seems to be working. I am new to cmake. Can someone explain a solution and some good tutorial/resource to follow.
Edit: Error that I get is undefined reference to `PKCS5_PBKDF2_HMAC_SHA1' which is a funciton in openssl/evp.h
Following is run by clion: /"path to clion"/clion-2018.3.1/bin/cmake/linux/bin/cmake -S"Path to project" -B"Path to project/cmake-build-debug" --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/make -f CMakeFiles/server.o.dir/build.make CMakeFiles/server.o.dir/server.cpp.o