From a6ff22e95b42d3bbbe2bfa41a823f631565c61b8 Mon Sep 17 00:00:00 2001 From: Teebonne <80053070+Teebonne@users.noreply.github.com> Date: Sat, 3 Sep 2022 22:28:38 +0100 Subject: [PATCH] Fixes error LNK2019: unresolved external symbol This fixes the error LNK2019: unresolved external symbol "__declspec(dllimport) public: that I had. --- include/xlnt/xlnt_config.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/xlnt/xlnt_config.hpp b/include/xlnt/xlnt_config.hpp index 73567629..642cd245 100644 --- a/include/xlnt/xlnt_config.hpp +++ b/include/xlnt/xlnt_config.hpp @@ -28,10 +28,14 @@ #ifdef XLNT_EXPORT #define XLNT_API __declspec(dllexport) #else +#ifdef XLNT_SHARED // For clients of the library, supress warnings about DLL interfaces for standard library classes #pragma warning(disable : 4251) #pragma warning(disable : 4275) #define XLNT_API __declspec(dllimport) +#else +#define XLNT_API +#endif #endif #else #define XLNT_API