Hiding C++ symbols with -fvisibility=hidden [duplicate]
问题 This question already has answers here : Hiding instantiated templates in shared library created with g++ (5 answers) Closed 4 days ago . I have a C++ library with a C API, and I have set the -fvisibility=hidden compiler flag, and then I have set __attribute__ ((visibility ("default"))) on C API methods. However, I still see visible C++ symbols. When I create a debian package for my library, I get the following symbols file Why are these symbols still visible ? 回答1: You should run your