[CMake] Proper way to export a library
David Cole
dlrdave at aol.com
Thu Oct 31 18:23:18 EDT 2013
> Microsoft believed in hidden by default for shared libraries.
Don't say things like this: people will never hide anything ever
again... ;-)
But seriously, making only those things public that are explicitly
exported has some major benefits: for one, it minimizes the probability
of clashes when combining multiple independent components.
It really should be a software developer's rule of thumb / best
practice to have the minimal set of symbols necessary be exported.
Anything exported that does not need to be is a maintenance burden, a
learning curve hurdle for newbies, and increases the likelihood of name
clashes with other libraries: all bad things.
So minimize your public APIs and your exports.
2 cents worth,
D
More information about the CMake
mailing list