You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a low priority, but can be considered a "best practice". The idea is to set symbol visibility so that only the public parts of the api are visible at link time. This makes it so that users (who have access to the implementation code) cannot use (link to) non-public parts of the api implementation in their code.
Exactly how best to achieve this is not clear. It seems like a set of preprocessor definitions is a good way to go. But exactly what those should be is not obvious.
CMake has some support/awareness of this issue and it would be best to find a "CMake approved" approach to this, so that it doesn't depend on the compilers and/or system on which the build is happening.
This is a low priority, but can be considered a "best practice". The idea is to set symbol visibility so that only the public parts of the api are visible at link time. This makes it so that users (who have access to the implementation code) cannot use (link to) non-public parts of the api implementation in their code.
Exactly how best to achieve this is not clear. It seems like a set of preprocessor definitions is a good way to go. But exactly what those should be is not obvious.
CMake has some support/awareness of this issue and it would be best to find a "CMake approved" approach to this, so that it doesn't depend on the compilers and/or system on which the build is happening.
Here are some links that may be useful:
https://stackoverflow.com/questions/39981491/c-symbol-visibility-in-static-archives
https://stackoverflow.com/questions/17080869/what-is-the-cmake-equivalent-to-gcc-fvisibility-hidden-when-controlling-the-e
https://phabricator.kde.org/T11490
https://libcork.io/0.15.0/visibility.html
https://dev.to/vejmartin/dll-symbol-visibility-in-c-36ip
https://gist.github.com/ax3l/ba17f4bb1edb5885a6bd01f58de4d542
The text was updated successfully, but these errors were encountered: