From e5c003d72618af79ac256faa395acf4f852e0ab3 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 1 Feb 2025 19:57:39 +0100 Subject: [PATCH] fix: Only use __declspec on with MSVC --- .../imgui/imgui/include/imconfig.h | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/lib/third_party/imgui/imgui/include/imconfig.h b/lib/third_party/imgui/imgui/include/imconfig.h index f43d905f0..4ac929b5a 100644 --- a/lib/third_party/imgui/imgui/include/imconfig.h +++ b/lib/third_party/imgui/imgui/include/imconfig.h @@ -32,20 +32,22 @@ namespace hex::log::impl { //#define IMGUI_API __declspec( dllexport ) //#define IMGUI_API __declspec( dllimport ) -#if EXPORT_SYMBOLS == 1 - #define IMGUI_API __declspec(dllexport) - #define IMGUI_IMPL_API __declspec(dllexport) - #define IMPLOT_API __declspec(dllexport) - #define IMPLOT_IMPL_API __declspec(dllexport) - #define IMPLOT3D_API __declspec(dllexport) - #define IMPLOT3D_IMPL_API __declspec(dllexport) -#else - #define IMGUI_API __declspec(dllimport) - #define IMGUI_IMPL_API __declspec(dllimport) - #define IMPLOT_API __declspec(dllimport) - #define IMPLOT_IMPL_API __declspec(dllimport) - #define IMPLOT3D_API __declspec(dllimport) - #define IMPLOT3D_IMPL_API __declspec(dllimport) +#if defined(_MSC_VER) + #if EXPORT_SYMBOLS == 1 + #define IMGUI_API __declspec(dllexport) + #define IMGUI_IMPL_API __declspec(dllexport) + #define IMPLOT_API __declspec(dllexport) + #define IMPLOT_IMPL_API __declspec(dllexport) + #define IMPLOT3D_API __declspec(dllexport) + #define IMPLOT3D_IMPL_API __declspec(dllexport) + #else + #define IMGUI_API __declspec(dllimport) + #define IMGUI_IMPL_API __declspec(dllimport) + #define IMPLOT_API __declspec(dllimport) + #define IMPLOT_IMPL_API __declspec(dllimport) + #define IMPLOT3D_API __declspec(dllimport) + #define IMPLOT3D_IMPL_API __declspec(dllimport) + #endif #endif //---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.