In OTB we are looking at several things related to class EXPORT macros, inclusing removing ITK_EXPORT, building with extern templates and using C++14’s [[deprecated]] attributes for classes, etc. As you may know we are a library heavily based on ITK. We also distribute binaries for Linux, Windows and Mac. However we cannot really figure out what the correct, portable and modern C++14 way of going about exporting symbols for both dynamic libraries and header only template code.
There is ModuleName_EXPORT generated by CMake, but also ITK_TEMPLATE_EXPORT. It’s all poorly documented and some of the git history is lost (links to old ITK jira). Plus compiler behavior is really unclear about when are symbols exported or not, depending on plateform, CMake wrapps all this in layers of macros, etc.