This works for me just fine:
main.cpp
#include <curl/curl.h>
int main( void ){
CURL *curl;
/* First step, init curl */
curl = curl_easy_init();
if (!curl) {
return -1;
}
return 0;
}
main.pro
TEMPLATE = app
TARGET = curl
QT -= core gui
LIBS += -lcurl
# CONFIG += link_pkgconfig
# PKGCONFIG += curl
SOURCES += main.cpp
As you can see in the comment, you could also use pkgconfig instead of the LIBS
variable which would probably be even neater.
Make sure you have all the corresponding packages installed that are necessary, for instance the development, etc.