sudo apt-get install libcurl4-openssl-dev 安装完成后,确保库的路径被正确包含在你的编译器搜索路径中。这通常不需要手动设置,但如果你使用的是非标准的安装路径,你可能需要指定库的路径。 确保编译命令中包含了正确的链接指令以链接libcurl库: 当你编译使用libcurl的程序时,需要在编译命令中包含-lcurl来链接li...
OpenSSL self-initializes nowadays. OpenSSL had the same problem, but worse because OpenSSL is used by more libraries than libcurl -- the problem had to be fixed. Regarding libcurl global finalization (cleanup), if it can at all be avoided, I would prefer to do that. [...] In that case...
I did this Using mingw64 enviroment #include <curl/curl.h> int main(int argc, char ** argv){ curl_global_init(0); CURL * handle = curl_easy_init(); printf("%p\n", handle); printf("URL: %i\n", curl_easy_setopt(handle, CURLOPT_URL, "https:...