curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: curl as static lib gives me linker errors

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Sat, 9 Apr 2022 23:23:35 +0200 (CEST)

On Sat, 9 Apr 2022, Julien Matthey via curl-library wrote:

> What is strange is that the CURL_STATICLIB macro is NOT set in my build
> (curl.h#109); and CURL_EXTERN expands as __declspec(dllimport); obviously it
> shouldn't.

On Windows, *you* need to define CURL_STATICLIB when you build your
application to use static libcurl.

https://curl.se/docs/faq.html#Link_errors_when_building_libcur

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-04-09