|
Boost Users : |
Subject: Re: [Boost-users] When to use BOOST_ALL_DYN_LINK?
From: Matthieu Brucher (matthieu.brucher_at_[hidden])
Date: 2016-10-24 04:51:17
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 <mailinglists_at_[hidden]>:
> 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_at_[hidden]
> 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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net