From 925f656646214817cd9bb0bdfbe46f7590a4f8cd Mon Sep 17 00:00:00 2001 From: barrybingo Date: Mon, 20 Apr 2020 13:09:30 +0100 Subject: [PATCH] Make names visible when using gcc/clang --- cimgui.h | 6 +++++- generator/cimgui_template.h | 6 +++++- generator/output/cimgui.h | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/cimgui.h b/cimgui.h index 42c3771..1483493 100644 --- a/cimgui.h +++ b/cimgui.h @@ -15,7 +15,11 @@ #define snprintf sprintf_s #endif #else - #define API + #ifdef __GNUC__ + #define API __attribute__((__visibility__("default"))) + #else + #define API + #endif #endif #if defined __cplusplus diff --git a/generator/cimgui_template.h b/generator/cimgui_template.h index e79c507..c1540ce 100644 --- a/generator/cimgui_template.h +++ b/generator/cimgui_template.h @@ -12,7 +12,11 @@ #define snprintf sprintf_s #endif #else - #define API + #ifdef __GNUC__ + #define API __attribute__((__visibility__("default"))) + #else + #define API + #endif #endif #if defined __cplusplus diff --git a/generator/output/cimgui.h b/generator/output/cimgui.h index 42c3771..1483493 100644 --- a/generator/output/cimgui.h +++ b/generator/output/cimgui.h @@ -15,7 +15,11 @@ #define snprintf sprintf_s #endif #else - #define API + #ifdef __GNUC__ + #define API __attribute__((__visibility__("default"))) + #else + #define API + #endif #endif #if defined __cplusplus