File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ endif
153
153
if USE_EXAMPLES
154
154
noinst_PROGRAMS += ecdsa_example
155
155
ecdsa_example_SOURCES = examples/ecdsa.c
156
- ecdsa_example_CPPFLAGS = -I$(top_srcdir ) /include
156
+ ecdsa_example_CPPFLAGS = -I$(top_srcdir ) /include -DSECP256K1_STATICLIB
157
157
ecdsa_example_LDADD = libsecp256k1.la
158
158
ecdsa_example_LDFLAGS = -static
159
159
if BUILD_WINDOWS
@@ -163,7 +163,7 @@ TESTS += ecdsa_example
163
163
if ENABLE_MODULE_ECDH
164
164
noinst_PROGRAMS += ecdh_example
165
165
ecdh_example_SOURCES = examples/ecdh.c
166
- ecdh_example_CPPFLAGS = -I$(top_srcdir ) /include
166
+ ecdh_example_CPPFLAGS = -I$(top_srcdir ) /include -DSECP256K1_STATICLIB
167
167
ecdh_example_LDADD = libsecp256k1.la
168
168
ecdh_example_LDFLAGS = -static
169
169
if BUILD_WINDOWS
@@ -174,7 +174,7 @@ endif
174
174
if ENABLE_MODULE_SCHNORRSIG
175
175
noinst_PROGRAMS += schnorr_example
176
176
schnorr_example_SOURCES = examples/schnorr.c
177
- schnorr_example_CPPFLAGS = -I$(top_srcdir ) /include
177
+ schnorr_example_CPPFLAGS = -I$(top_srcdir ) /include -DSECP256K1_STATICLIB
178
178
schnorr_example_LDADD = libsecp256k1.la
179
179
schnorr_example_LDFLAGS = -static
180
180
if BUILD_WINDOWS
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ target_link_libraries(example INTERFACE
7
7
$<$<PLATFORM_ID:Windows>:bcrypt>
8
8
)
9
9
if (NOT BUILD_SHARED_LIBS AND MSVC )
10
- target_link_options (example INTERFACE / IGNORE :4217 )
10
+ target_compile_definitions (example INTERFACE SECP256K1_STATICLIB )
11
11
endif ()
12
12
13
13
add_executable (ecdsa_example ecdsa.c)
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ typedef int (*secp256k1_nonce_function)(
140
140
# define SECP256K1_API __declspec (dllexport)
141
141
# define SECP256K1_API_VAR extern __declspec (dllexport)
142
142
# endif
143
- # elif defined _MSC_VER
143
+ # elif defined( _MSC_VER ) && !defined( SECP256K1_STATICLIB )
144
144
# define SECP256K1_API
145
145
# define SECP256K1_API_VAR extern __declspec (dllimport)
146
146
# elif defined DLL_EXPORT
You can’t perform that action at this time.
0 commit comments