title: Undefined symbol error for cURL installed at /usr/local/lib
body: <p>I a m trying to use libcurl on a Raspeberry Pi running Raspbian 9.4 Stretch. I follow the <a href="https://github.com/curl/curl/blob/master/GIT-INFO" rel="nofollow noreferrer">instructions</a> to install the library by running buildcong, configure and make. The library is installed in /usr/local/lib.</p>
  
  <p>The program:</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include &lt;curl/curl.h&gt;
  using namespace std;
  
  int main(){
     CURL *curl;
     curl_mime *form = NULL;
  
     curl_global_init(CURL_GLOBAL_ALL);
     curl = curl_easy_init();
  
     if(curl) 
        form = curl_mime_init(curl);
  }
  </code></pre>
  
  <p>It is compiled with:
  <code>g++ test.cpp -o test -I/usr/local/lib/curl-master/include -L/usr/local/lib/curl-master/lib/.libs  -l:libcurl.so</code></p>
  
  <p>The error is at run-time:
  <code>symbol lookup error: ./test: undefined symbol: curl_mime_init</code></p>
  
  <p>Replacing the end with <code>-lcurl</code> returns the same error.</p>