C-Pluff C API 0.2.0
|
Macros for controlling inter-module symbol visibility and linkage.
Macros for controlling inter-module symbol visibility and linkage.
These macros have platform specific values. CP_EXPORT, CP_IMPORT and CP_HIDDEN can be reused by plug-in implementations for better portability. The complexity is mostly due to Windows DLL exports and imports.
Each module should usually define its own macro to declare API symbols with CP_EXPORT and CP_IMPORT as necessary. For example, a mobule could define a macro MY_API
in the API header file as follows.
By default the API symbols would then be marked for import which is correct when client modules are including the API header file. When compiling the module itself the option -DMY_API=CP_EXPORT
would be passed to the compiler to override the API header file and to mark the API symbols for export. The overriding definition could also be included in module source files or in an internal header file before including the API header file.
Generated on Thu Mar 14 2024 19:33:41 for C-Pluff C API by 1.9.8