Skip to content

Commit fd99494

Browse files
committed
Added a comment hinting at how to set IMGUI_API for shared librairies on e.g. Linux, macOS (#7806)
1 parent da36336 commit fd99494

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

imconfig.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121

2222
//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows
2323
// Using Dear ImGui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.
24-
// DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
25-
// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
26-
//#define IMGUI_API __declspec( dllexport )
27-
//#define IMGUI_API __declspec( dllimport )
24+
// - Windows DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
25+
// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
26+
//#define IMGUI_API __declspec(dllexport) // MSVC Windows: DLL export
27+
//#define IMGUI_API __declspec(dllimport) // MSVC Windows: DLL import
28+
//#define IMGUI_API __attribute__((visibility("default"))) // GCC/Clang: override visibility when set is hidden
2829

2930
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to clean your code of obsolete function/names.
3031
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS

0 commit comments

Comments
 (0)