August 2017
Intermediate to advanced
438 pages
14h 19m
English
The code for this recipe consists of two parts. The first part is the library itself. The second part is the code that uses that library. Both parts use the same header, in which the library methods are declared. Managing symbol visibility in a portable way using Boost is simple and can be done using the following steps:
#include <boost/config.hpp>
#if defined(MY_LIBRARY_LINK_DYNAMIC)# if defined(MY_LIBRARY_COMPILATION)# define MY_LIBRARY_API BOOST_SYMBOL_EXPORT# else# define MY_LIBRARY_API BOOST_SYMBOL_IMPORT# endif#else# define MY_LIBRARY_API#endif
Read now
Unlock full access