Re: libcurl compiles w/ MinGW but doesn't work
Date: Tue, 14 Mar 2006 16:57:55 +0100
"Damien Pierce" <emaildmp_at_yahoo.com> wrote:
> I found that the key was I need -DCURL_STATICLIB when
> compiling the source file (but not when linking it to
> the curl lib(!)). I previously thought that flag was
> only needed when compiling the library.
Wrong, wrong. When in doubt, look at the code. From <curl/curl.h>:
#if (defined(WIN32) || defined(_WIN32)) && !defined(CURL_STATICLIB)
#define CURL_EXTERN __declspec(dllexport)
#define CURL_EXTERN __declspec(dllimport)
Isn't that enough to answer your questions? I.e. '-DCURL_STATICLIB'
puts no __declspec decorations on any public functions when either
using o building libcurl. Omitting it, puts in import/export decoration
Received on 2006-03-14