cURL / Mailing Lists / curl-library / Single Mail

curl-library

defining CURL_STATICLIB in libcurl.pc

From: Mark Brand <mabrand_at_mabrand.nl>
Date: Thu, 24 May 2012 21:12:39 +0200

Hi,

Very nice that building static libcurl works out of the box now with
curl-7_26_0.

However, naively linking Windows applications to static libcurl does not
work due to CURL_EXTERN introducing the dreaded _imp prefix in the
public headers.

It seems like a reasonable measure to me to add -DCURL_STATICLIB to
Cflags in libcurl.pc. This defines away CURL_EXTERN and linking works as
expected. Or is there a better way?

regards,

Mark

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