cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using libcurl with zlib

From: east2006 east2006 <east2006_at_gmail.com>
Date: Thu, 10 May 2012 16:42:45 +0300

Thank you, that solved it

When compiling libcurl with zlib (MSVC), I get this error:

libcurl.res : fatal error LNK1241: resource file zlib1d.lib(zlib1.res)
already specified

Unless I turn on 'Link Time Code Generation'.

Why does this happens?

Thank You!

On Thu, May 10, 2012 at 2:35 PM, Gisle Vanem <gvanem_at_broadpark.no> wrote:

> "east2006 east2006" <east2006_at_gmail.com> wrote:
>
> 1>libcurl.lib(content_**encoding.obj) : error LNK2019: unresolved
>> external
>> symbol _zlibVersion_at_0 referenced in function _Curl_unencode_gzip_write
>> 1>.\Standalone-D\**MelodoContent.exe : fatal error LNK1120: 5 unresolved
>> externals
>>
>>
>> I'm staticly compiling libcurl with zlib (1.2.3) by including zlib.lib and
>> adding preprocessors:
>>
>> HAVE_ZLIB_H
>> HAVE_ZLIB
>> HAVE_LIBZ
>>
>
> Somehow you seems to have built libcurl with '-DZLIB_WINAPI' while
> zlib.lib was built without this. How have you built libcurl? Alternatively
> build zlib with '-DZLIB_WINAPI'.
> Either way, the linker in your case expects __stdcall imports. I.e. the
> '@x' suffixes.
>
> --gv
> ------------------------------**------------------------------**-------
> List admin: http://cool.haxx.se/list/**listinfo/curl-library<http://cool.haxx.se/list/listinfo/curl-library>
> Etiquette: http://curl.haxx.se/mail/**etiquette.html<http://curl.haxx.se/mail/etiquette.html>
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-05-10