Skip to content

Commit 6f6cab9

Browse files
committed
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.
1 parent 485f608 commit 6f6cab9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/secp256k1.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,13 @@ typedef int (*secp256k1_nonce_function)(
141141
# define SECP256K1_NO_BUILD
142142
#endif
143143

144+
/** At secp256k1 build-time DLL_EXPORT is defined when building objects destined
145+
* for a shared library, but not for those intended for static libraries.
146+
*/
147+
144148
#ifndef SECP256K1_API
145149
# if defined(_WIN32)
146-
# ifdef SECP256K1_BUILD
150+
# if defined(SECP256K1_BUILD) && defined(DLL_EXPORT)
147151
# define SECP256K1_API __declspec(dllexport)
148152
# else
149153
# define SECP256K1_API

0 commit comments

Comments
 (0)