diff --git a/include/dpp/export.h b/include/dpp/export.h index f60605cb..ec7d2d55 100644 --- a/include/dpp/export.h +++ b/include/dpp/export.h @@ -24,23 +24,28 @@ // Investigate: MSVC doesn't like this //static_assert(__cplusplus >= 201703L, "D++ Requires a C++17 compatible compiler. Please ensure that you have enabled C++17 in your compiler flags."); -#ifdef DPP_BUILD +#ifndef DPP_STATIC - #ifdef _WIN32 - #include - #endif + #if DPP_BUILD + + #ifdef _WIN32 + #include + #endif - #ifdef _WIN32 - #define DPP_EXPORT __declspec(dllexport) + #ifdef _WIN32 + #define DPP_EXPORT __declspec(dllexport) + #else + #define DPP_EXPORT + #endif #else - #define DPP_EXPORT + #ifdef _WIN32 + #define DPP_EXPORT __declspec(dllimport) + #else + #define DPP_EXPORT + #endif #endif #else - #ifdef _WIN32 - #define DPP_EXPORT __declspec(dllimport) - #else - #define DPP_EXPORT - #endif + #define DPP_EXPORT #endif #ifndef _WIN32