Skip to content

Commit 3e51598

Browse files
committed
MinGW support while building as DLL
This is PR for open-source-parsers#434 It will fix reported build error.
1 parent 1b5e61d commit 3e51598

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/json/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
#ifdef JSON_IN_CPPTL
4040
#define JSON_API CPPTL_API
4141
#elif defined(JSON_DLL_BUILD)
42-
#if defined(_MSC_VER)
42+
#if defined(_MSC_VER) || defined(__GNUC__)
4343
#define JSON_API __declspec(dllexport)
4444
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
4545
#endif // if defined(_MSC_VER)
4646
#elif defined(JSON_DLL)
47-
#if defined(_MSC_VER)
47+
#if defined(_MSC_VER) || defined(__GNUC__)
4848
#define JSON_API __declspec(dllimport)
4949
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
5050
#endif // if defined(_MSC_VER)

0 commit comments

Comments
 (0)