Andreas Huber | 1 Jan 2008 22:38
Picon
Favicon

[auto_link][thread] Including boost/thread/thread.hpp requires linking against date_time?

Hi

In a Visual Studio 2008 project, when I include the trunk version of 
boost/thread/thread.hpp, it seems I must also link against the date_time 
library. When I build the same program with bjam, while not linking against 
date_time,  the resulting program runs just fine.

So my question is: Why does including thread.hpp require linking against the 
date_time library? It seems that it is not needed at all?

Thanks & Regards,

--

-- 
Andreas Huber

When replying by private email, please remove the words spam and trap
from the address shown in the header. 

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Anthony Williams | 7 Jan 2008 13:05
Picon
Favicon

Re: [auto_link][thread] Including boost/thread/thread.hpp requires linking against date_time?

Andreas Huber <ahd6974-spamboostorgtrap <at> yahoo.com> writes:

> In a Visual Studio 2008 project, when I include the trunk version of 
> boost/thread/thread.hpp, it seems I must also link against the date_time 
> library. When I build the same program with bjam, while not linking against 
> date_time,  the resulting program runs just fine.
> 
> So my question is: Why does including thread.hpp require linking against the 
> date_time library? It seems that it is not needed at all?

The new trunk/release version of boost.thread has replaced uses of the private
xtime type with uses of the date_time library in the functions that take
timeouts: sleep, timed_lock, timed_wait, etc.

Anthony

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Andreas Huber | 9 Jan 2008 19:56
Picon
Favicon

Re: [auto_link][thread] Including boost/thread/thread.hpp requires linking against date_time?

Hi Anthony

>> So my question is: Why does including thread.hpp require linking against 
>> the
>> date_time library? It seems that it is not needed at all?
>
> The new trunk/release version of boost.thread has replaced uses of the 
> private
> xtime type with uses of the date_time library in the functions that take
> timeouts: sleep, timed_lock, timed_wait, etc.

Ok, but then I'd only need to link against the date_time library if I 
actually use these functions, correct? Autolink currently forces me to link 
against date_time even with the following program:

#define BOOST_ALL_DYN_LINK
#include <boost/thread/thread.hpp>
#include <iostream>

static void ThreadFunction()
{
  std::cout << "Hello from a boost thread" << std::endl;
}

int main()
{
  boost::thread(&::ThreadFunction).join();
  return 0;
}

(Continue reading)


Gmane