cURL / Mailing Lists / curl-library / Single Mail


Linking trouble in VS2008

From: James Lake <>
Date: Fri, 2 May 2014 19:45:32 -0400

Newbie user here trying to build my first test Visual Studio 2008 (64 bit)
cURL app.


I am using the cURL installer from here:


I've been scouring the Internet for days and am still unable to link my code
to libcurl.lib.


Here's the output:


1>------ Rebuild All started: Project: TestCurl, Configuration: Release
Win32 ------

1>Deleting intermediate and output files for project 'TestCurl',
configuration 'Release|Win32'





1>TestCurl.obj : error LNK2001: unresolved external symbol _curl_easy_init

1>C:\Users\Administrator\Documents\My Projects\VS
2008\TestCurl\Release\TestCurl.exe : fatal error LNK1120: 1 unresolved

1>Build log was saved at "file://c:\Users\Administrator\Documents\My
Projects\VS 2008\TestCurl\TestCurl\Release\BuildLog.htm"

1>TestCurl - 2 error(s), 0 warning(s)

========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


Here's the code:


// TestCurl.cpp : Defines the entry point for the console application.



#include "stdafx.h"

#include <stdio.h>

#include <curl.h>


int _tmain(int argc, _TCHAR* argv[])


      CURL *curl;

      CURLcode res;


      curl = curl_easy_init();


      return 0;



I have added "CURLSTATIC_LIB" to my list of preprocessor definitions:







I have included "C:\ cURL\include\curl" in Additional Include Directories on
the C/C++->General tab and "C:\ cURL\lib\libcurl.lib" in Additional
Dependencies on the Linker->Input tab.


I have tried to build in both debug and release mode after reading,
somewhere, that there are 2 versions of libcurl.lib; libcurl.lib for release
and libcurld.lib for debug. But I did not see the libcurld.lib file in your I need that?


Here are the compiler options from the command line:


/O2 /Oi /GL /I "C:\cURL\include\curl" /D "WIN32" /D "NDEBUG" /D "_CONSOLE"
/Fo"Release\\" /Fd"Release\vc90.pdb" /W3 /nologo /c /Zi /TP


And here are the command line linker options:


/OUT:"C:\Users\Administrator\Documents\My Projects\VS
2008\TestCurl\Release\TestCurl.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG
/PDB:"C:\Users\Administrator\Documents\My Projects\VS
2008\TestCurl\Release\TestCurl.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF
C:\cURL\lib\libcurl.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib


About ready to pull my hair out! Aargh!


Thanks for any help you can provide!


Jim Lake <>


List admin:
Received on 2014-05-03