title: Use a dll from a c++ program. (borland c++ builder and in general)
body: <p>I'm trying to use a dll, namely libcurl, with my program, but, it's not linking. Libcurl comes with .h files that I can include (takes care of dllimport), but then I guess I must specify which dll to actually use when linking somehow... How do I do that? I'm compiling with Borland C++ builder, but I really want to know how these things work in general...</p>
  
  <p>EDIT:
  This is the code (straight c/p from curl homepage)</p>
  
  <pre><code>bool FTPGetFile::ConnectToFTP(string ftpServer){
  CURL *curl;
  CURLcode res;
  curl = curl_easy_init();
  if(curl) {
      curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
      res = curl_easy_perform(curl);
      return true;
  }else{
      return false;
  }
  } 
  </code></pre>
  
  <p>And here are the errors:</p>
  
  <pre>
  [Linker Error] Error: Unresolved external '_curl_easy_init' referenced from C:\PROJECTS\PC\TOOLBOX\DEBUG_BUILD\FTPGETFILE.OBJ
  [Linker Error] Error: Unresolved external '_curl_easy_setopt' referenced from C:\PROJECTS\PC\TOOLBOX\DEBUG_BUILD\FTPGETFILE.OBJ
  [Linker Error] Error: Unresolved external '_curl_easy_perform' referenced from C:\PROJECTS\PC\TOOLBOX\DEBUG_BUILD\FTPGETFILE.OBJ
  </pre>
  
  <p>EDIT 2: As per suggestion from joe_muc I have made the lib files with the implib tool and included them in the linker path. I still get the same errors.</p>