Limitations

| Home | Libraries | People | FAQ | More

## Limitations

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.

### Exporting weak symbols (Fails on MinGW, Android)

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 usefull for working around linker problems or to test your program for compatability with linkers that do not support exporting weak symbols.

### User defined section names (Fails on SunOS + Oracle Solaris Studio Compilers)

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

### Thread safe library loading (Fails on FreeBSD, MacOS, iOS and some other)

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