Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Limitations

Exporting weak symbols (Fails on MinGW, Android)
User defined section names (Fails on SunOS + Oracle Solaris Studio Compilers)
Thread safe library loading (Fails on FreeBSD, MacOS, iOS and some other)
Nested Function Definitions

Some platforms and compilers do not provide all the required functionality to have a fully functional Boost.DLL. Such compilers are mentioned in this section along with possible workarounds for those limitations.

Some versions of Android, MinGW and ld on Windows platform fail to mix __dllexport__ and weak attributes. This leads us to situation, where we must explicitly specify translation unit in which BOOST_DLL_ALIAS is instantiated, making all other BOOST_DLL_ALIAS declarations with that alias name an extern variable.

Unit that must hold an instance of BOOST_DLL_ALIAS must define BOOST_DLL_FORCE_ALIAS_INSTANTIATION before including any of the Boost.DLL library headers.

You may explicitly disable export of weak symbols using BOOST_DLL_FORCE_NO_WEAK_EXPORTS. This may be useful for working around linker problems or to test your program for compatibility with linkers that do not support exporting weak symbols.

Some platforms ignore section attributes, so that querying for a symbols in a specified section using boost::dll::library_info may return nothing.

On some platforms dlopen,dlclose and some other functions assume that they won't be called concurrently.

Platforms that certaly have that issue are FreeBSD, MacOS, iOS.

Platforms that certaly do not have such issue are Windows, Linux+glibc, Android, QNX.

Other platforms are under question. If you're using one of the platforms that are not listed (for example Linux+busybox), you may run the shared_library_concurrent_load_test test to detect the issue:

cd boost_folder/libs/dll/test
../../../b2 -a shared_library_concurrent_load_test

If a function is defined inside the class-definition it may be interpreted as always-inline which can lead to the function not being exported at all. This does however differ between between compilers.


PrevUpHomeNext