C-Macro-Collections icon indicating copy to clipboard operation
C-Macro-Collections copied to clipboard

Export symbols for windows

Open duarm opened this issue 1 year ago • 0 comments
trafficstars

Feature Request Template

What is the nature of this request?

  • New functionalities

Is your feature request related to a problem? Please describe.

Compiling on windows/mingw requires each symbol to be exported, with something like __declspec(dllexport), libraries usually have something like this, example from PHYSFS

#if defined(PHYSFS_DECL)
/* do nothing. */
#elif defined(PHYSFS_STATIC)
#define PHYSFS_DECL   /**/
#elif defined(_WIN32) || defined(__OS2__)
#define PHYSFS_DECL __declspec(dllexport)
#elif defined(__SUNPRO_C)
#define PHYSFS_DECL __global
#elif ((__GNUC__ >= 3) && (!defined(__EMX__)) && (!defined(sun)))
#define PHYSFS_DECL __attribute__((visibility("default")))
#else
#define PHYSFS_DECL
#endif

or at least expose a LIB_DECL, which can be defined by the consumer

Describe the solution you'd like

prefix every function declaration on header.h with CMC_DECL, and have something like the above example on core.h

duarm avatar Jan 26 '24 01:01 duarm