-- as described at the GCC Wiki - Visibility. I have exercised How to use the attribute((visibility("default")))? and Simple C++ Symbol Visibility Demo but still do not understand some parts of the GCC Wiki - Visibility article.
At its Step-by-step_guide you find
In the other examples I found that it is sufficient to only decorate the declarations in the header files. Why also decorate the definitions in the source files?
If it is publicly used, mark with FOX_API like this:
extern FOX_API PublicFunc()
I haven't seen this extern keyword in the other examples and I have never used it for public functions. Why do I have to use it here?
The given macro starts with
#ifdef FOX_DLL // defined if FOX is compiled as a DLL
If using CMake where or how is FOX_DLL
defined?