I am able to get CMake to work on Windows, and on Linux I am struggling with CURL. Cant get vcpkg to work there, and I’ve decided to use static linking instead as its safe to assume most linux users do not change the default installation path for Curl/LibCurl. However, the code below does not seem to work:
set(CURL_LIBRARY "-lcurl")
set(CURL_INCLUDE_DIR "/usr/include/x86_64-linux-gnu")
find_package(CURL REQUIRED)
I can see curl.h and curl.c in the directory “/usr/include/x84_64-linux-gnu/curl”, trying to change this to “/usr/bin” or “usr/bin/curl” does not seem to work either. I keep getting undefined reference to curl_easy_init
, and undefined reference to curl_easy_set_opt
error messages. How can I fix this issue?