Boost logo

Boost :

From: helmut.zeisel_at_[hidden]
Date: 2001-10-08 09:50:52


I tried to compile

http://www.boost.org/libs/thread/doc/thread.html#Example

under VC++ 6.0 and had the following problems:

1) #include <boost/thread/xtime.hpp> is missing

2) For some reason, "thrd" is parsed as a function pointer,
   not as an object of class boost::thread.

   I found two workarounds for that problem:

   2a) Make two lines of code instead of one:

   thread_alarm fct(secs);
   boost::thread thrd(fct);

   2b) Explicitely construct a function0 object:

   boost::thread thrd(boost::function0<void>(thread_alarm(secs)));

3) VC++ 6.0 gives a bothersome warning if no "return 0"
   is at the end of main.

Helmut


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk