1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5 <title>Limitations</title>
6 <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
7 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
8 <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
9 <link rel="up" href="../boost_dll.html" title="Chapter 14. Boost.DLL">
10 <link rel="prev" href="../boost/dll/experimental/import_mangled.html" title="Function import_mangled">
11 <link rel="next" href="f_a_q_.html" title="F.A.Q.">
13 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14 <table cellpadding="2" width="100%"><tr>
15 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
16 <td align="center"><a href="../../../index.html">Home</a></td>
17 <td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
18 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
19 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
20 <td align="center"><a href="../../../more/index.htm">More</a></td>
23 <div class="spirit-nav">
24 <a accesskey="p" href="../boost/dll/experimental/import_mangled.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost_dll.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="f_a_q_.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
27 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
28 <a name="boost_dll.limitations"></a><a class="link" href="limitations.html" title="Limitations">Limitations</a>
29 </h2></div></div></div>
30 <div class="toc"><dl class="toc">
31 <dt><span class="section"><a href="limitations.html#boost_dll.limitations.exporting_weak_symbols__fails_on_mingw__android_">Exporting
32 weak symbols (Fails on MinGW, Android)</a></span></dt>
33 <dt><span class="section"><a href="limitations.html#boost_dll.limitations.user_defined_section_names__fails_on_sunos___oracle_solaris_studio_compilers_">User
34 defined section names (Fails on SunOS + Oracle Solaris Studio Compilers)</a></span></dt>
35 <dt><span class="section"><a href="limitations.html#boost_dll.limitations.multithread">Thread safe library
36 loading (Fails on FreeBSD, MacOS, iOS and some other)</a></span></dt>
37 <dt><span class="section"><a href="limitations.html#boost_dll.limitations.nested">Nested Function Definitions</a></span></dt>
40 Some platforms and compilers do not provide all the required functionality
41 to have a fully functional Boost.DLL. Such compilers are mentioned in this
42 section along with possible workarounds for those limitations.
45 <div class="titlepage"><div><div><h3 class="title">
46 <a name="boost_dll.limitations.exporting_weak_symbols__fails_on_mingw__android_"></a><a class="link" href="limitations.html#boost_dll.limitations.exporting_weak_symbols__fails_on_mingw__android_" title="Exporting weak symbols (Fails on MinGW, Android)">Exporting
47 weak symbols (Fails on MinGW, Android)</a>
48 </h3></div></div></div>
50 Some versions of Android, <code class="computeroutput"><span class="identifier">MinGW</span></code>
51 and <code class="computeroutput"><span class="identifier">ld</span></code> on Windows platform
52 fail to mix <code class="computeroutput"><span class="identifier">__dllexport__</span></code>
53 and <code class="computeroutput"><span class="identifier">weak</span></code> attributes. This
54 leads us to situation, where we must explicitly specify translation unit
55 in which <code class="computeroutput"><a class="link" href="../BOOST_DLL_ALIAS.html" title="Macro BOOST_DLL_ALIAS">BOOST_DLL_ALIAS</a></code> is
56 instantiated, making all other <code class="computeroutput"><a class="link" href="../BOOST_DLL_ALIAS.html" title="Macro BOOST_DLL_ALIAS">BOOST_DLL_ALIAS</a></code>
57 declarations with that alias name an <code class="computeroutput"><span class="keyword">extern</span></code>
61 Unit that must hold an instance of <code class="computeroutput"><a class="link" href="../BOOST_DLL_ALIAS.html" title="Macro BOOST_DLL_ALIAS">BOOST_DLL_ALIAS</a></code>
62 must define <code class="computeroutput"><a class="link" href="../BOOST_DL_idm46262983596016.html" title="Macro BOOST_DLL_FORCE_ALIAS_INSTANTIATION">BOOST_DLL_FORCE_ALIAS_INSTANTIATION</a></code>
63 before including any of the Boost.DLL library headers.
66 You may explicitly disable export of weak symbols using <code class="computeroutput"><a class="link" href="../BOOST_DL_idm46262983594208.html" title="Macro BOOST_DLL_FORCE_NO_WEAK_EXPORTS">BOOST_DLL_FORCE_NO_WEAK_EXPORTS</a></code>.
67 This may be useful for working around linker problems or to test your program
68 for compatibility with linkers that do not support exporting weak symbols.
72 <div class="titlepage"><div><div><h3 class="title">
73 <a name="boost_dll.limitations.user_defined_section_names__fails_on_sunos___oracle_solaris_studio_compilers_"></a><a class="link" href="limitations.html#boost_dll.limitations.user_defined_section_names__fails_on_sunos___oracle_solaris_studio_compilers_" title="User defined section names (Fails on SunOS + Oracle Solaris Studio Compilers)">User
74 defined section names (Fails on SunOS + Oracle Solaris Studio Compilers)</a>
75 </h3></div></div></div>
77 Some platforms ignore section attributes, so that querying for a symbols
78 in a specified section using <code class="computeroutput"><a class="link" href="../boost/dll/library_info.html" title="Class library_info">boost::dll::library_info</a></code>
83 <div class="titlepage"><div><div><h3 class="title">
84 <a name="boost_dll.limitations.multithread"></a><a class="link" href="limitations.html#boost_dll.limitations.multithread" title="Thread safe library loading (Fails on FreeBSD, MacOS, iOS and some other)">Thread safe library
85 loading (Fails on FreeBSD, MacOS, iOS and some other)</a>
86 </h3></div></div></div>
88 On some platforms <code class="computeroutput"><span class="identifier">dlopen</span></code>,<code class="computeroutput"><span class="identifier">dlclose</span></code> and some other functions assume
89 that they won't be called concurrently.
92 Platforms that certaly have that issue are FreeBSD, MacOS, iOS.
95 Platforms that certaly do not have such issue are Windows, Linux+glibc, Android,
99 Other platforms are under question. If you're using one of the platforms
100 that are not listed (for example Linux+busybox), you may run the <code class="computeroutput"><span class="identifier">shared_library_concurrent_load_test</span></code> test
103 <pre class="programlisting"><span class="identifier">cd</span> <span class="identifier">boost_folder</span><span class="special">/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">dll</span><span class="special">/</span><span class="identifier">test</span>
104 <span class="special">../../../</span><span class="identifier">b2</span> <span class="special">-</span><span class="identifier">a</span> <span class="identifier">shared_library_concurrent_load_test</span>
109 <div class="section">
110 <div class="titlepage"><div><div><h3 class="title">
111 <a name="boost_dll.limitations.nested"></a><a class="link" href="limitations.html#boost_dll.limitations.nested" title="Nested Function Definitions">Nested Function Definitions</a>
112 </h3></div></div></div>
114 If a function is defined inside the class-definition it may be interpreted
115 as always-inline which can lead to the function not being exported at all.
116 This does however differ between between compilers.
120 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
121 <td align="left"></td>
122 <td align="right"><div class="copyright-footer">Copyright © 2014 Renato Tegon Forti, Antony Polukhin<br>Copyright © 2015 Antony Polukhin<br>Copyright © 2016 Antony Polukhin, Klemens Morgenstern<br>Copyright © 2017-2019 Antony Polukhin<p>
123 Distributed under the Boost Software License, Version 1.0. (See accompanying
124 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
129 <div class="spirit-nav">
130 <a accesskey="p" href="../boost/dll/experimental/import_mangled.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost_dll.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="f_a_q_.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>