[HELP] Curlpp with Visual Studio 2012

Hi All,

I am trying to learn C++ with curlpp but getting following error could you please help me.

Steps followed :

1) Downloaded Curlpp from https://code.google.com/archive/p/curlpp/downloads

2) Added Include libraries in VC++ directories.

3) Added CURL_STATICLIB;CURLPP_STATICLIB; to C/C++ Preprocessor

4) Added Libcurl.lib and curllib_static.lib to Linker input options.

And tried to build project with below code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* \file
* Setting and copying options.
* 
*/


#include <string>
#include <sstream>
#include <iostream>

#include <curlpp/cURLpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>



const long MyPort = 80;


/** 
* This example is made to show you how you can use the Options.
*/
int main(int, char **)
{
        curlpp::Cleanup myCleanup;

        // First easy example.
        {
          // The first easiest example is to retreive the content of
          // a web page and put it in a stream.
          std::cout << curlpp::options::Url("http://example.com");

          // You don't need to use just the standard outputs. You
          // can use any stream:
          std::ostringstream os;
          os << curlpp::options::Url("http://example.com");
        }
  return 0;
}


But getting below error.

Error 1 error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class curlpp::OptionTrait<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,10002> const &)" (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABV?$OptionTrait@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@$0CHBC@@curlpp@@@Z) referenced in function _main Test_Req

Error 2 error LNK1120: 1 unresolved externals 1 1 Test_Req

Could you please help me...
Last edited on
Bump
> 2) Added Include libraries in VC++ directories.
What does that mean?


> 4) Added Libcurl.lib and curllib_static.lib to Linker input options.
Maybe you did not provide the correct path? The linker ignores library silently that cannot be found.
Topic archived. No new replies allowed.