C
chiefbutz
I am trying to compile an app that uses the libcurl API. I have the
files for that in the correct places. Then I compile I get the
following:
"Error: Unresolved ecternal '_curl_easy_init' refrenced from
c:\C++\CURL.OBJ
Error: Unresolved ecternal '_curl_easy_setopt' refrenced from
c:\C++\CURL.OBJ
Error: Unresolved ecternal '_curl_easy_perfrom' refrenced from
c:\C++\CURL.OBJ
Error: Unresolved ecternal '_curl_easy_cleanup' refrenced from
c:\C++\CURL.OBJ"
For now I am just testing to make sure I have the curl bit working, the
file stuff will come into use later, so here is my code:
"// basic file operations
#include <iostream>
#include <fstream>
#include <curl/curl.h>
using namespace std;
int main () {
// ofstream myfile;
// myfile.open ("example.txt");
// myfile << "Writing this to a file.\n";
// myfile.close();
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "google.com");
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
cout << res;
}
return 0;
}"
files for that in the correct places. Then I compile I get the
following:
"Error: Unresolved ecternal '_curl_easy_init' refrenced from
c:\C++\CURL.OBJ
Error: Unresolved ecternal '_curl_easy_setopt' refrenced from
c:\C++\CURL.OBJ
Error: Unresolved ecternal '_curl_easy_perfrom' refrenced from
c:\C++\CURL.OBJ
Error: Unresolved ecternal '_curl_easy_cleanup' refrenced from
c:\C++\CURL.OBJ"
For now I am just testing to make sure I have the curl bit working, the
file stuff will come into use later, so here is my code:
"// basic file operations
#include <iostream>
#include <fstream>
#include <curl/curl.h>
using namespace std;
int main () {
// ofstream myfile;
// myfile.open ("example.txt");
// myfile << "Writing this to a file.\n";
// myfile.close();
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "google.com");
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
cout << res;
}
return 0;
}"