При компиляции ошибка:
g++ main.cpp -o main -lcurl
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcurl: No such file or directory
collect2.exe: error: ld returned 1 exit status
Но в mingw64 присуствует curl по путям
/mingw64/include/curl
/mingw64/lib/libcurl.a
/mingw64/lib/libcurl.dll.a и.т.д
g++ main.cpp -o main -lcurl
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcurl: No such file or directory
collect2.exe: error: ld returned 1 exit status
Но в mingw64 присуствует curl по путям
/mingw64/include/curl
/mingw64/lib/libcurl.a
/mingw64/lib/libcurl.dll.a и.т.д
Кусок кода с curl:
curl = curl_easy_init();
if (curl) {
fp = fopen(outfilename,"wb");
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
fclose(fp);
}