From db9be102e6b3a44e95425c3ee3d2526681ec1466 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 12 Apr 2019 10:56:09 -0400 Subject: [PATCH] Properly defined uiprivExtern in static cases. --- ui.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui.h b/ui.h index a4ac70fe..75a4520d 100644 --- a/ui.h +++ b/ui.h @@ -11,13 +11,19 @@ extern "C" { #endif #ifdef uiprivBuildingLibui -#ifdef _WIN32 +#if defined(_WIN32) && !defined(uiStatic) #define uiprivExtern __declspec(dllexport) extern +#elif deffined(_WIN32) +#define uiprivExtern extern #else #define uiprivExtern __attribute__((visibility("default"))) extern #endif #else -// TODO add __declspec(dllimport) on windows, but only if not static#define uiprivExtern extern +#if defined(_WIN32) && !defined(uiStatic) +#define uiprivExtern __declspec(dllimport) extern +#else +#define uiprivExtern extern +#endif #endif // C++ is really really really really really really dumb about enums, so screw that and just make them anonymous