compile libcurl LINK problem
Date: Sun, 26 Jul 2009 13:55:08 -0700
Here is my code, it's as simple as possible:
int _tmain(int argc, _TCHAR* argv)
I am trying to compile in visual studio 2008 express, I keep getting this error:
1>lcpRequest.obj : error LNK2019: unresolved external symbol __imp__curl_global_init referenced in function _wmain
1>Visual Studio 2008\Projects\lcpRequest\Debug\lcpRequest.exe : fatal error LNK1120: 1 unresolved externals
I already followed this steps from libcurl website tutorial: http://curl.haxx.se/libcurl/c/Using-libcurl-with-SSH-support-in-Visual-Studio-2008.pdf
I compiled libcurl.lib with preprocessor definition: CURL_STATICLIB, CURL_DISABLE_LDAP, I changed Runtime library to Multi-threaded DLL (/MD).
The libcurl.lib compiled successfully.
But when I trying to link into my own project, it keeps getting "error LNK2019: unresolved external symbol" error, which I've shown above.
I, of course, add additional include directory, and add additional library dependency, add libcurl.lib to additional dependency, add CURL_STATICLIB in preprocessor definition. I am sure these I setup correctly, because if not, the error would be like File Not Found...
I also tried compile both project with Multi-threaded DLL Debug /MDd.
I searched online and libcurl mailing list, so many people have the same problem. But none of those solution works for me. I really tried all possible way, but the error is just still there.
Can anyone help me?
Received on 2009-07-26