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.
This commit is contained in:
Cory Fields 2022-05-04 20:02:52 +00:00
parent 485f608fa9
commit 6f6cab9989
1 changed files with 5 additions and 1 deletions

View File

@ -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