There are several problems here:
- Never. ABSOLUTELY never add headers from library directly to your project. Copy them to your include catalog.
#include <curl.h>
: you use<>
which means - search in include catalog. Try replacing it with:#include "curl.h"
- which means search through project and include catalog.
But you should do nr. 1 -as this code is not part of your project. It is part of curl project.
EDIT
As posted in comment - it depends where you actually put the headers. If you put them in include\curl
directory, then use #include "curl/curl.h"
.
EDIT AFTER QUESTION EDIT
You need to specify .lib references.
When you use curl you don't compile it. It is already compiled by some genius guys from curl to the form of .dll
s. Your program doesn't know how to use them unless you tell it how to. To do that you must change your linker options - by providing so called lib
files. lib
files are there to tell linker which .dll
s it should use.
I assume you have your curl catalog. Apart from include
there should also be lib
. Now what you need to do is to tell linker that you need libcurl.a
from lib
catalog of curl. Go ahead: Project build options | Linker settings. In Link libraries
section specify the path to libcurl.a
.