id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 13048,Static libraries and visibility hidden,Mark M ,,"I've been told that I can compile the Boost libraries with ""-fvisibility=hidden"". But I think it will work only for shared libraries, and I am building static libraries. If I'm wrong, please point out what I am missing. I will use the Filesystem library as an example, but I think this applies to Boost in general. There are a number of functions that need to have default visibility to allow the libraries to link with other code without error. These functions have the BOOST_FILESYSTEM_DECL macro in their declaration. I am using Xcode. The config/compiler/clang.hpp file has defined BOOST_SYMBOL_EXPORT with the attribute-visibility-default setting. So I look for code that sets BOOST_FILESYSTEM_DECL to be BOOST_SYMBOL_EXPORT. When I look at the filesystem/config.hpp file, BOOST_FILESYSTEM_DECL is blank, unless (BOOST_ALL_DYN_LINK or BOOST_FILESYSTEM_DYN_LINK) and BOOST_FILESYSTEM_SOURCE are set. But with static libraries, I don't want those settings, right? There is another preprocessor macro called BOOST_SYMBOL_VISIBLE, but it is only used one place in filesystem (for the filesystem_error class). Any help in the right direction would be appreciated. Or if this is an oversight, that would be helpful to know.",Bugs,new,To Be Determined,Building Boost,Boost Development Trunk,Problem,,static library visibility hidden,braden@…