ui/export.h¶
CF UI Library export/import macros. More...
Defines¶
| Name | |
|---|---|
| CF_UI_EXPORT Export/import macro for CF UI Library symbols. |
Detailed Description¶
CF UI Library export/import macros.
Copyright: Copyright © 2026
Defines CF_UI_EXPORT macro for controlling symbol visibility in shared libraries.
- When building cfui.dll/so, symbols are exported
- When using cfui.dll/so, symbols are imported
Macros Documentation¶
define CF_UI_EXPORT¶
Export/import macro for CF UI Library symbols.
Usage: class CF_UI_EXPORT MyClass { ... };
CF_UI_EXPORT void myFunction();
Platform behavior:
- Windows: Uses declspec(dllexport/dllimport)
- Linux/GCC: Uses __attribute((visibility("default")))
CMake automatically defines CFUI_EXPORTS when building the shared library. This follows the standard CMake convention:
Source code¶
#pragma once
#if defined(_WIN32) || defined(_MSC_VER)
# ifdef CFUI_EXPORTS
# define CF_UI_EXPORT __declspec(dllexport)
# else
# define CF_UI_EXPORT __declspec(dllimport)
# endif
#else
// Linux/Unix: same attribute for both building and using
# define CF_UI_EXPORT __attribute__((visibility("default")))
#endif
Updated on 2026-03-09 at 10:14:01 +0000