When building the C++ Clipper library on Linux, all symbols are exported by default.
This is not recommended practice, as internal symbols may pollute other symbol namespaces and partially undermine a clearly defined API.
The Debian project encourages maintainers to write a symbols file that clearly defines which symbols will be exported by the respective library. This symbols file can then be used to verify binary API compatibility between releases.
Unfortunately, this may pose a major problem for C++ libraries: Compiler-generated symbols can change with different compiler versions, dependent libraries and other issues that are not directly caused by an incompatible API change. While the resulting library is fully compatible with applications linking to it, the symbols check during package building may fail.
It is thus a good idea to reduce visibility of internal symbols - and is already commonplace when building DLLs for win32.
Cmake makes it relatively easy to mark symbol visbility and run the compiler with appropriate flags: https://cmake.org/cmake/help/v3.0/module/GenerateExportHeader.html
A patch that will apply the necessary changes to CMakeList.txt and clipper.h is attached.
I tried to guess which symbols have to be marked visible, but they should be reviewed by someone more knowledgable with the library.
Anonymous