cURL / Mailing Lists / curl-library / Single Mail

curl-library

Building curllib using MSVC-8

From: Robert Iakobashvili <coroberti_at_gmail.com>
Date: Thu, 2 Aug 2007 07:11:49 +0200

curl-7.16.4, MSVC-8, patched, Win2K, sp-4

Trying to work with VC-8 project provided by the distribution, with builds
curllib.lib as a static library,
a am getting at linking stage of my executable the following linking errors:

fetcher.obj : error LNK2019: unresolved external symbol
__imp__curl_easy_cleanup referenced in function "int __cdecl
batch_run(struct lookup_context *,unsigned int)"
(?batch_run@@YAHPAUlookup_context@@I_at_Z)
fetcher.obj : error LNK2019: unresolved external symbol
__imp__curl_multi_cleanup referenced in function "int __cdecl
batch_run(struct lookup_context *,unsigned int)"
(?batch_run@@YAHPAUlookup_context@@I_at_Z)
etc.

Looks like may be mangling differences.

The project, provided by the distribution, builds curllib.lib as a static
library using "Compile as C++ code" (/TP) directive.
I also compiled it as a "C code" (/TC) and tried to build my executable
either with /TP or /TC, but this was not helpful.

My workaround was to build curllib.lin and curllib.dll changing the project
settings to Dynamic Library (.dll).
Thus, it works when built either compiled as C or as C++.

Any tips/suggestions/explanations form windows/MSVC gurus would be very much
appreciated.
Thank you.

-- 
Sincerely,
Robert Iakobashvili,
coroberti %x40 gmail %x2e com
...........................................................
http://curl-loader.sourceforge.net
A web testing and traffic generation tool.
Received on 2007-08-02