Jeremy Jeremy - 6 months ago 56
C Question

Cygwin: Libcurl Not Working

I can't seem to get libcurl to work. I've installed it with the cygwin package installer but when I run it in the cygwin bash shell with:

gcc -Wall -lcurl -g blah.c -o blah

It I get:

curl/curl.h: No such file or directory`,

then following errors that provoked by the
#include <curl/curl.h>
not working.

find / -name curl.h

if curl.h is found, compile with this:


but do not include 'curl.h', just the directory containing it. If you are doing it like this:

#include <curl/curl.h>

then only use the directory that contains the curl directory as the -I parameter.

man gcc for more info.