Boost logo

Threads-Devel :

From: David Ward (dward_at_[hidden])
Date: 2008-04-16 10:10:30


Hello,

I'm using dynamic linking on windows and since upgrading to boost 1.35,
I'm seeing a new dependency on the boost_date_time shared library.

My source code boils down to:

#define BOOST_ALL_DYN_LINK

#include <boost/thread/mutex.hpp>

int main(int argc, char* argv[])
{
        boost::mutex m;
        boost::mutex::scoped_lock l(m);
        return 0;
}

The dependent symbol in boost_date_time.dll is
boost::gregorian::greg_month::greg_month(unsigned short)

Looking at the mutex headers, I see that the definition of mutex has
changed a bit since 1.34 (at least under win32).

  namespace detail
    {
        typedef ::boost::detail::basic_timed_mutex underlying_mutex;
    }

    class mutex:
                boost::noncopyable,
        public ::boost::detail::underlying_mutex
    {
        ...

Clearly, the implementation code for a boost::mutex is actually a timed
mutex which explains the dependency on date_time.

This isn't a big problem of course, but its nice to be able to ship as
few dlls as necessary and we've never had to ship boost_date_time
before. Is this something that could be addressed in future versions?

Regards,

David Ward.


Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk