Replies: 1 comment
-
It's for Windows or *NIX when building shared libraries because you need to declare classes and external symbols as The definitions are in config.h #ifdef _WINDOWS
#define AGENT_SYMBOL_EXPORT __declspec(dllexport)
#define AGENT_SYMBOL_IMPORT __declspec(dllimport)
#else // _WINDOWS
#define AGENT_SYMBOL_EXPORT __attribute__((visibility("default")))
#define AGENT_SYMBOL_IMPORT __attribute__((visibility("default")))
#endif // _WINDOWS
#ifdef SHARED_AGENT_LIB
#ifdef AGENT_BUILD_SHARED_LIB
#define AGENT_LIB_API AGENT_SYMBOL_EXPORT
#else
#define AGENT_LIB_API AGENT_SYMBOL_IMPORT
#endif
#define AGENT_SYMBOL_VISIBLE AGENT_LIB_API
#else // SHARED_AGENT_LIB
#define AGENT_LIB_API
#define AGENT_SYMBOL_VISIBLE
#endif For Windows the DLL needs to export the symbols On *NIX it makes sure we have all the symbols visible from anything using the shared library. The std way of doing this is to declare: Both these techniques allow for only the API to be exported from the shared library and not every symbol. Best,
|
Beta Was this translation helpful? Give feedback.
-
Can anyone tell what does AGENT_LIB_API means?
Beta Was this translation helpful? Give feedback.
All reactions