cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem compiling with msys/mingw

From: Gisle Vanem <giva_at_bgnett.no>
Date: Wed, 24 Nov 2004 10:03:14 +0100

"Andrés García" wrote:

>> > -#if (defined(WIN32) || defined(_WIN32)) && !defined(CURL_STATICLIB)
>> > +
>> > +#if (defined(WIN32) || defined(_WIN32)) && !defined(CURL_STATICLIB) &&
>> > !defined(__MINGW32__) +
>>
>> What is this good for?
>
> To get it to compile with mingw, without it I get lots of 'undefined reference
> to __imp__whateverfunction', which, I must admit, I have no idea what it
> means.

It looks like the generated lib/makefile didn't have -DBUILDING_LIBCURL
added to the CFLAGS. I'm no Configure expert, but show me the compile
command for lib/*.c.

Note that compiling with the static curl-lib (libcurl.a), add -DCURL_STATICLIB.
And compiling and using the DLL and import-lib (libcurldll.a?), one need to add
no extra CFLAGS. I did it this way since using libcurl.dll seems most common.

--gv
Received on 2004-11-24