Skip to content

Commit bc7c8db

Browse files
committed
abi: Use dllexport for mingw builds
This should fix mingw exports, specifically hiding the following: secp256k1_pre_g_128 secp256k1_pre_g secp256k1_ecmult_gen_prec_table This changes our visibility macros to look more like gcc's recommendation: https://gcc.gnu.org/wiki/Visibility#How_to_use_the_new_C.2B-.2B-_visibility_support
1 parent f30c748 commit bc7c8db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/secp256k1.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ typedef int (*secp256k1_nonce_function)(
133133
# define SECP256K1_NO_BUILD
134134
#endif
135135

136-
/* Symbol visibility. See libtool manual, section "Windows DLLs". */
137-
#if defined(_WIN32) && !defined(__GNUC__)
136+
/* Symbol visibility. See https://gcc.gnu.org/wiki/Visibility */
137+
/* DLL_EXPORT is defined internally for shared builds */
138+
#if defined(_WIN32)
138139
# ifdef SECP256K1_BUILD
139140
# ifdef DLL_EXPORT
140141
# define SECP256K1_API __declspec (dllexport)

0 commit comments

Comments
 (0)