From 516547dcd92426ca5bbdd68675a58158fb7968db Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 6 Aug 2017 12:55:58 +0200 Subject: [PATCH] Introduce CIMGUI_NO_EXPORT to stop exporting symbols Useful when static linking in a library to avoid collisions --- cimgui/cimgui.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cimgui/cimgui.h b/cimgui/cimgui.h index 5f25ff5..7bafa56 100644 --- a/cimgui/cimgui.h +++ b/cimgui/cimgui.h @@ -2,8 +2,12 @@ #include #if defined _WIN32 || defined __CYGWIN__ +#ifdef CIMGUI_NO_EXPORT +#define API +#else #define API __declspec(dllexport) -#ifndef __GNUC__ +#endif +#ifdef __GNUC__ #define snprintf sprintf_s #endif #else