cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem compiling with msys/mingw

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 24 Nov 2004 23:43:10 +0100 (CET)

On Wed, 24 Nov 2004, Gisle Vanem wrote:

>> Interesting observation: obviously the configure script sets the
>> 'DLL_EXPORT' define when building the shared lib (DLL) version of the code.
>> (Thanks to AC_LIBTOOL_WIN32_DLL I believe.)
>
> I took a brief look at it and didn't understand half of it. What a ugly way
> to build a package. What's the libtool really good for?

libtool is good for making shared libraries/DLL on just about any system out
there. There's no such thing as a portable way to build those things. libtool
makes it possible.

> And who/what is controlling what AC_LIBTOOL_WIN32_DLL should do?

The libtool package includes that macro, so the libtool project controls that.

> Sure, but IMO simply DLL_EXPORT is a bit vague.

Yes I agree that it is vague, but I couldn't find any easy way to
extend/replace that define with "BUILDING_LIBCURL".

> I suggest:
>
> #if defined(BUILDING_LIBCURL) || defined(DLL_EXPORT)
> #define CURL_EXTERN __declspec(dllexport)
> #else
> #define CURL_EXTERN __declspec(dllimport)
> #endif

If that makes the mingw build compile fine, then I'm OK with it.

BTW, the AC_LIBTOOL_WIN32_DLL usage is documented here:

         http://sources.redhat.com/autobook/autobook/autobook_254.html

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-11-24