robotology / how-to-export-cpp-library

An OS-agnostic C++ library template in plain CMake.
MIT License
363 stars 54 forks source link

Prefer GenerateExportHeader to EXPORT_ALL_SYMBOLS #49

Open mathstuf opened 5 years ago

mathstuf commented 5 years ago

In my experience, having finer control over exported symbols is much better than exporting all of them (either via the default behavior of GCC-and-friends or via WINDOWS_EXPORT_ALL_SYMBOLS). Among these benefits:

drdanz commented 5 years ago

:+1: Unfortunately we are dealing with lazy researchers who ignore this kind of issues, therefore EXPORT_ALL_SYMBOLS is the quick and dirty way to achieve the same result. :stuck_out_tongue_closed_eyes: