-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
I use amalgamated code and I found that when building jsoncpp as part of my DLL it have list of undefined reference. Checking the code, it only declare exports/imports only for MSVC. The following code in json.h works.
If I get time I will send PR but for now here is the relevant part of the code in case one can fix it.
#ifdef JSON_IN_CPPTL
#define JSON_API CPPTL_API
#elif defined(JSON_DLL_BUILD)
#if defined(_MSC_VER) || defined(__GNUC__)
#define JSON_API __declspec(dllexport)
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
#endif // if defined(_MSC_VER)
#elif defined(JSON_DLL)
#if defined(_MSC_VER) || defined(__GNUC__)
#define JSON_API __declspec(dllimport)
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
#endif // if defined(_MSC_VER)
#endif // ifdef JSON_IN_CPPTL
#if !defined(JSON_API)
#define JSON_API
#endif
Metadata
Metadata
Assignees
Labels
No labels