Nati V
Nati V

Reputation: 702

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?

Upvotes: 4

Views: 27122

Answers (1)

Nati V
Nati V

Reputation: 702

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

Upvotes: 4

Related Questions