c++ - Installing libcurl on Visual Express 2013 -


update: placing #include "stdafx.h" on top fixed errors except:

error   1   error lnk1104: cannot open file 'libcurl.lib'   c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\link    consoleapplication2 

a question that's been asked many times, , still have hard time installing kind of library on kind of compiler. went visual express, trying install libcurl, both manually , using "nuget", seems best option me. downloaded , installed nuget, ran command install libcurl, , did. included d:\program files (x86)\microsoft visual studio 12.0\libcurl\include;$(includepath) in "project properties-> vc++directories/include directories"

d:\program files (x86)\microsoft visual studio 12.0\libcurl\lib;%(additionallibrarydirectories) 

in linker/additional library directories and

libcurl.lib;libeay32.lib;ssleay32.lib;ws2_32.lib;libssh2.lib;zlib.lib;wldap32.lib;ws2_32.lib; 

in linker/input/additional dependencies. code example follows:

#include <iostream> #include <stdio.h>  #include <curl/curl.h>  #include "stdafx.h"  int main(void) {     curl *curl;     curlcode res;      curl = curl_easy_init();     if (curl) {         curl_easy_setopt(curl, curlopt_url, "http://google.com");         res = curl_easy_perform(curl);          /* cleanup */         curl_easy_cleanup(curl);     }     return 0; } 

and i'm having errors:

warning 1   warning c4627: '#include <iostream>': skipped when looking precompiled header use   c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 1   1   consoleapplication2 warning 2   warning c4627: '#include <curl.h>': skipped when looking precompiled header use c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 3   1   consoleapplication2 error   3   error c2065: 'curl' : undeclared identifier c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 8   1   consoleapplication2 error   4   error c2065: 'curl' : undeclared identifier c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 8   1   consoleapplication2 error   5   error c2065: 'curlcode' : undeclared identifier c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 9   1   consoleapplication2 error   6   error c2146: syntax error : missing ';' before identifier 'res' c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 9   1   consoleapplication2 error   7   error c2065: 'res' : undeclared identifier  c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 9   1   consoleapplication2 error   8   error c2065: 'curl' : undeclared identifier c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 11  1   consoleapplication2 error   9   error c3861: 'curl_easy_init': identifier not found c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 11  1   consoleapplication2 error   10  error c2065: 'curl' : undeclared identifier c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 12  1   consoleapplication2 error   11  error c2065: 'curl' : undeclared identifier c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 13  1   consoleapplication2 error   12  error c2065: 'curlopt_url' : undeclared identifier  c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 13  1   consoleapplication2 error   13  error c3861: 'curl_easy_setopt': identifier not found   c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 13  1   consoleapplication2 error   14  error c2065: 'res' : undeclared identifier  c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 14  1   consoleapplication2 error   15  error c2065: 'curl' : undeclared identifier c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 14  1   consoleapplication2 error   16  error c3861: 'curl_easy_perform': identifier not found  c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 14  1   consoleapplication2 error   17  error c2065: 'curl' : undeclared identifier c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 17  1   consoleapplication2 error   18  error c3861: 'curl_easy_cleanup': identifier not found  c:\users\geeh\documents\visual studio 2013\projects\consoleapplication2\consoleapplication2\consoleapplication2.cpp 17  1   consoleapplication2 


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -