Boost C++ Libraries: Ticket #13052: iostreams visibility=hidden for non-Windows platforms https://svn.boost.org/trac10/ticket/13052 <p> For the Mac, I am compiling the Boost libraries and my code using visibility=hidden. My code cannot find "boost::iostreams::zlib::default_compression". This is defined in iostreams/filter/zlib.hpp as Code: <em>BOOST_IOSTREAMS_DECL extern const int default_compression;</em> </p> <p> The only place that BOOST_IOSTREAMS_DECL is defined is iostreams/detail/config/dyn_link.hpp. That file sets the macro to either Windows-specific settings (<em>declspec(dllexport)</em>), or leaves it blank. So the Boost iostreams library will have the wrong visibility settings. </p> <p> This is unlike other places in the Boost code, where the right visibility settings are obtained by defining the library DECL macro as BOOST_SYMBOL_EXPORT. (Take a look at filesystem/config.hpp as an example of how it is done for most of the other libraries.) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13052 Trac 1.4.3 Mark M <mememory359@…> Thu, 01 Jun 2017 20:46:56 GMT <link>https://svn.boost.org/trac10/ticket/13052#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13052#comment:1</guid> <description> <p> Found another case where the settings are only valid for Windows, in the Locale library. </p> <p> In locale/definitions.hpp, it is required that BOOST_HAS_DECLSPEC is defined before doing the rest of the code. This is only true for win32 (platform) and gcc (compiler). Since I'm using macosx/clang, this is another case were I won't be able to get the right visibility=hidden settings. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 24 Aug 2017 18:01:37 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/13052 https://svn.boost.org/trac10/ticket/13052 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-fix-iostreams-visibility.patch</span> </li> </ul> Ticket anonymous Thu, 24 Aug 2017 18:01:52 GMT attachment set https://svn.boost.org/trac10/ticket/13052 https://svn.boost.org/trac10/ticket/13052 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-fix-locale-visibility.patch</span> </li> </ul> Ticket anonymous Thu, 24 Aug 2017 18:03:32 GMT <link>https://svn.boost.org/trac10/ticket/13052#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13052#comment:2</guid> <description> <p> Add patches, which fix helps us to compile boost (1.64.0 tag version) with <code>-fvisibility=hidden</code> and don't shadow interface. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 24 Aug 2017 18:27:12 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/13052 https://svn.boost.org/trac10/ticket/13052 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-fix-iostreams-visibility.2.patch</span> </li> </ul> <p> fixed version </p> Ticket