Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fatal error: curl/curl.h: No such file or directory

I downloaded the libcurl library from https://curl.haxx.se/libcurl/
and i'm trying to include and compile it
but I get this error

fatal error: curl/curl.h: No such file or directory

even that I put the curl folder in the same directory

the command that I used to compile

 x86_64-w64-mingw32-gcc try.c -o a.exe -lws2_32 -lcurl

So I searched and I found these answers

curl.h no such file or directory , Ubuntu - #include <curl/curl.h> no such file or directory

so I did

sudo apt-get install  libcurl4-openssl-dev

but still not working what to do?

like image 772
Nati V Avatar asked Sep 02 '25 14:09

Nati V


1 Answers

I solved it I just copied the curl directory that I downloaded to /usr/x86_64-w64-mingw32/include/

and when you compile you need to do -lcurl/curl

Thanks for your help

like image 181
Nati V Avatar answered Sep 05 '25 03:09

Nati V