From 7e74d55f784168b2a97056f189de97e166be7661 Mon Sep 17 00:00:00 2001 From: Blake Madden Date: Wed, 9 Nov 2022 11:45:45 -0500 Subject: [PATCH] Don't use WXUSINGDLL, use custom flag instead WXUSINGDLL may enabled by build system for something else and may not be what we are wanting for this library. Instead, use more library-specific JSON_USING_DLL and JSON_CREATING_DLL flags to control DLL import/export options. Also, don't use API_EXPORT (might conflict with something else), use JSON_API_EXPORT. --- src/wxSimpleJSON.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wxSimpleJSON.h b/src/wxSimpleJSON.h index 8de4d54..6057949 100644 --- a/src/wxSimpleJSON.h +++ b/src/wxSimpleJSON.h @@ -12,18 +12,18 @@ #include #endif -#ifdef API_CREATING_DLL -# define API_EXPORT WXEXPORT -#elif defined(WXUSINGDLL) -# define API_EXPORT WXIMPORT +#ifdef JSON_CREATING_DLL +# define JSON_API_EXPORT WXEXPORT +#elif defined(JSON_USING_DLL) +# define JSON_API_EXPORT WXIMPORT #else /* not making nor using DLL */ -# define API_EXPORT +# define JSON_API_EXPORT #endif typedef struct cJSON cJSON; /// @brief Class for reading, parsing, and writing JSON data. -class API_EXPORT wxSimpleJSON +class JSON_API_EXPORT wxSimpleJSON { protected: cJSON *m_d{ nullptr};