Boost logo

Boost Users :

Subject: Re: [Boost-users] BOOST_ALL_DYN_LINK
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2010-03-07 14:21:31


Paul wrote:

> Hi all,
>
> I'm confused about boost dynamic linking on windows MSVC90
>
> I always define: BOOST_ALL_NO_LIB
> So that I directly control which DLLs I link to.
> I add the signals dll for linking.
>
> Then, if I define BOOST_ALL_DYN_LINK, I get lots of these messages:
>
> boost_1_42_0\boost/signals/detail/signal_base.hpp(113) : warning C4251:
> 'boost::signals::detail::signal_base_impl::combiner_' : class 'boost::any'
> needs to have dll-interface to be used by clients of class
> 'boost::signals::detail::signal_base_impl'
> 39> boost_1_42_0\boost/any.hpp(36) : see declaration of 'boost::any'
>
> I've read up on this and understand why the warnings are shown.
>
> BUT,
> I don't understand why I am able to still link my program if I do NOT define
> BOOST_ALL_DYN_LINK.
>
> Without the flag, it compiles without warnings, it links without problems,
> AND the executable requires the signals DLL to be available, so clearly it
> IS dynamically linked. Right?

Do you include import library for Boost.Signals in the link? Then, presumably,
compiler automatically 'dllimports' the symbol. Please see:

        http://blogs.msdn.com/oldnewthing/archive/2006/07/26/679044.aspx

Does this help?

- Volodya


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