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

 

I am using the cURL installer from here:
http://www.confusedbycode.com/curl/.

 

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>Compiling...

1>TestCurl.cpp

1>stdafx.cpp

1>Linking...

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
externals

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:

 

WIN32

NDEBUG

_CONSOLE

CURL_STATICLIB

 

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
site.do 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"
/D "CURL_STATICLIB" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MD /Gy
/Fo"Release\\" /Fd"Release\vc90.pdb" /W3 /nologo /c /Zi /TP
/errorReport:prompt

 

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
/MANIFESTFILE:"Release\TestCurl.exe.intermediate.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
/LTCG /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT
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

[email protected] <mailto:[email protected]> 

 

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to