Hi,
The DYN_LINK indicates that the library will be linked against the shared
version of Boost. Whether you need the static or the shared version is
actually different than deciding if your library is static or shared.
Regards,
Matthieu
2016-10-24 9:43 GMT+01:00 Florian Lindner
Hello,
http://www.boost.org/doc/libs/1_62_0/libs/log/doc/html/log/ installation/config.html says:
BOOST_LOG_DYN_LINK If defined in user code, the library will assume the binary is built as a dynamically loaded library ("dll" or "so"). Otherwise it is assumed that the library is built in static mode. This macro must be either defined or not defined for all translation units of user application that uses logging. This macro can help with auto-linking on platforms that support it.
BOOST_ALL_DYN_LINK Same as BOOST_LOG_DYN_LINK but also affects other Boost libraries the same way.
We build our library in a dynamic and a static version using SCons:
staticlib = env.StaticLibrary ( target = buildpath + '/libprecice', source = [sourcesPreCICE] ) env.Alias("staticlib", staticlib)
solib = env.SharedLibrary ( target = buildpath + '/libprecice', source = [sourcesPreCICE] ) env.Alias("solib", solib)
Both have BOOST_LOG_DYN_LINK set:
env.Append(CPPDEFINES=["BOOST_LOG_DYN_LINK"])
However, I wonder if this is correct. Should DYN_LINK only be set when building the dynamically linked lib?
Thanks, Florian
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Information System Engineer, Ph.D. Blog: http://blog.audio-tk.com/ LinkedIn: http://www.linkedin.com/in/matthieubrucher