From 6f6cab9989a4d3f4a28e3cdbfacc4e3e1e55c843 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Wed, 4 May 2022 20:02:52 +0000 Subject: [PATCH] abi: Don't export symbols in static Windows libraries libtool takes care of building both object versions, we just need to pick the right one to export symbols. --- include/secp256k1.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/secp256k1.h b/include/secp256k1.h index 86ab7e5..dddab34 100644 --- a/include/secp256k1.h +++ b/include/secp256k1.h @@ -141,9 +141,13 @@ typedef int (*secp256k1_nonce_function)( # define SECP256K1_NO_BUILD #endif +/** At secp256k1 build-time DLL_EXPORT is defined when building objects destined + * for a shared library, but not for those intended for static libraries. + */ + #ifndef SECP256K1_API # if defined(_WIN32) -# ifdef SECP256K1_BUILD +# if defined(SECP256K1_BUILD) && defined(DLL_EXPORT) # define SECP256K1_API __declspec(dllexport) # else # define SECP256K1_API