title: Library path for C++. Fail?
body: <p>Im trying to execute this code on a mac. I have installed the curl. When i search for curl, i can find it under <code>/usr/include/curl/curl.h</code>. Below is the program i want to run. Taken from <a href="http://curl.haxx.se/libcurl/c/simple.html" rel="nofollow">here</a>.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;curl/curl.h&gt;
  
  int main(void)
  {
    CURL *curl;
    CURLcode res;
  
    curl = curl_easy_init();
    if(curl) {
      curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
      res = curl_easy_perform(curl);
  
      /* always cleanup */
      curl_easy_cleanup(curl);
    }
    return 0;
  }
  </code></pre>
  
  <p>when i try to compile the program. see below.</p>
  
  <pre><code>g++ simple.cpp 
  Undefined symbols:
    "_curl_easy_perform", referenced from:
        _main in cciFNPkt.o
    "_curl_easy_init", referenced from:
        _main in cciFNPkt.o
    "_curl_easy_setopt", referenced from:
        _main in cciFNPkt.o
    "_curl_easy_cleanup", referenced from:
        _main in cciFNPkt.o
  ld: symbol(s) not found
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>What s going on? why doesnt the program finds the path of this file?</p>
  
  <p>How can i fix it?</p>