title: Undefined symbol _curl_easy_setopt error while running example code
body: <p>I am trying to test run the first example in curlpp and I am getting the error "Undefined symbol: _curl_easy_setopt".  I have an idea that this is a problem with how I have tried linking the library.  Below is my methodology.</p>
  
  <p>header search paths -> for both debug and release -> (I typed) /usr/local/include</p>
  
  <p>library search paths -> for both debug and release -> (I typed) /usr/local/lib</p>
  
  <p>other linker flags -> for both debug and release -> (I typed) -lcurlpp</p>
  
  <p>I ran the the example with an API url I have used in python successfully in place of "example.com".<a href="https://i.stack.imgur.com/CV3vA.jpg" rel="nofollow noreferrer">This is a picture of the full error</a>. Thank you!`</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;sstream&gt;
  #include &lt;iostream&gt;
  
  #include &lt;curlpp/cURLpp.hpp&gt;
  #include &lt;curlpp/Easy.hpp&gt;
  #include &lt;curlpp/Options.hpp&gt;
  
  
  namespace
  {
  const long MyPort = 80;
  }
  
  /**
   * This example is made to show you how you can use the Options.
   */
  int main(int, char **)
  {
      try
      {
          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 &lt;&lt; curlpp::options::Url("https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&amp;symbol=VSLR&amp;frequency=5min&amp;outputsize=full&amp;datatype=json&amp;apikey=IGDV8B3MO9GQ9R35");
  
            // You don't need to use just the standard outputs. You
            // can use any stream:
            std::ostringstream os;
            os &lt;&lt; curlpp::options::Url("https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&amp;symbol=VSLR&amp;frequency=5min&amp;outputsize=full&amp;datatype=json&amp;apikey=IGDV8B3MO9GQ9R35");
          }
  
          // More elaborate example.
          {
            // What the previous example done there was simply
            // to create a curlpp::Easy class, which is the basic
            // object in cURLpp, and then set the Url option.
            // curlpp::options classes are the primitives that allow to specify
            // values to the requests.
            curlpp::options::Url myUrl(std::string("https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&amp;symbol=VSLR&amp;frequency=5min&amp;outputsize=full&amp;datatype=json&amp;apikey=IGDV8B3MO9GQ9R35"));
            curlpp::Easy myRequest;
            myRequest.setOpt(myUrl);
  
            // Now that all the options we wanted to set are there, we need to
            // actually do the request. the "perform" method does actually that.
            // With that call, the request will be done and the content of that URL
            // will be printed in std::cout (which is the default).
            myRequest.perform();
  
            // If we wanted to put the content of the URL within a string stream
            // (or any type of std::ostream, for that matter), like the first example,
            // we would use the WriteStrem option like this:
            std::ostringstream os;
            curlpp::options::WriteStream ws(&amp;os);
            myRequest.setOpt(ws);
            myRequest.perform();
  
            // There is some shorcut within curlpp that allow you to write shorter code
            // like this:
            os &lt;&lt; myRequest;
  
            // That would do exactly what the previous code was doing.
          }
  
          // Creation of the URL option.
          curlpp::options::Url myUrl(std::string("https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&amp;symbol=VSLR&amp;frequency=5min&amp;outputsize=full&amp;datatype=json&amp;apikey=IGDV8B3MO9GQ9R35"));
  
          // Copy construct from the other URL.
          curlpp::options::Url myUrl2(myUrl);
  
          // Creation of the port option.
          curlpp::options::Port myPort(MyPort);
  
          // Creation of the request.
          curlpp::Easy myRequest;
  
          // Creation of an option that contain a copy of the URL option.
          curlpp::OptionBase *mytest = myUrl.clone();
          myRequest.setOpt(*mytest);
  
          // You can reuse the base option for other type of option
          // and set the option to the request. but first, don't forget
          // to delete the previous memory. You can delete it since the
          // option is internally duplicated for the request.
          delete mytest;
          mytest = myPort.clone();
          myRequest.setOpt(*mytest);
          delete mytest;
  
          // You can clone an option directly to the same type of
          // option.
          curlpp::options::Url *myUrl3 = myUrl.clone();
          myRequest.setOpt(myUrl3);
          // Now myUrl3 is owned by the request we will NOT use
          // it anymore.
  
  
          // You don't need to declare an option if you just want
          // to use it once.
          myRequest.setOpt(curlpp::options::Url("https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&amp;symbol=VSLR&amp;frequency=5min&amp;outputsize=full&amp;datatype=json&amp;apikey=IGDV8B3MO9GQ9R35"));
  
  
          // Note that the previous line wasn't really efficient
          // because we create the option, this option is duplicated
          // for the request and then the option destructor is called.
          // You can use this instead:
          myRequest.setOpt(new curlpp::options::Url("https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&amp;symbol=VSLR&amp;frequency=5min&amp;outputsize=full&amp;datatype=json&amp;apikey=IGDV8B3MO9GQ9R35"));
          // Note that with this the request will use directly this
          // instance we just created. Be aware that if you pass an
          // Option pointer to the setOpt function, it will consider
          // the instance has its own instance. The Option instance
          // will be deleted when the request will be deleted, so
          // don't use the instance further in your code.
  
  
          // Doing the previous line is efficient as this:
          myRequest.setOpt(myUrl.clone());
  
  
          // You can retreive the value of a specific option.
          std::cout &lt;&lt; myUrl2.getValue() &lt;&lt; std::endl;
  
          // Perform the transaction with the options set.
          myRequest.perform();
      }
  
      catch( curlpp::RuntimeError &amp;e )
      {
          std::cout &lt;&lt; e.what() &lt;&lt; std::endl;
      }
  
      catch( curlpp::LogicError &amp;e )
      {
          std::cout &lt;&lt; e.what() &lt;&lt; std::endl;
      }
  
    return 0;
  }
  </code></pre>