Boost logo

Boost :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2007-01-04 08:08:49

Lars Kunert <lkunert_at_[hidden]> writes:

> I have written a prgram using boost::thread that works fine on a 32 and
> on a 64 bit linux machine. On a sun/solaris machine the program fails
> with the following message:
>>>terminate called after throwing an instance of 'boost::thread_resource_error'

Which means that it couldn't create an instance of a thread resource: a mutex,
a thread, a condvar, etc.

> In my project I do not use bjam, but autoconf/automake.
> In order to test boost::thread by hand, I compiled some of the files in
> boost/libs/thread/test by hand...
>>>${SRCDIR}/sun64/gcc-3.4/bin/g++-3.4 \
>>>-I. \
>>>-I${SRCDIR}/sun64/include \
>>>-I${SRCDIR}/sun64/include/boost-1.33.1 \
>>>-O3 -DNDEBUG -m64 -Wall \
>>>-L${SRCDIR}/sun64/lib/boost-1.33.1-g++-3.4 -lboost_thread-gcc-mt
>>>-lboost_unit_test_framework-gcc \
>>>-R${SRCDIR}/sun64/lib/boost-1.33.1-g++-3.4 \
>>>-o test_barrier \

You need to enable thread support in the compiler. I think the option is
-pthreads on Solaris, but you should check the docs.


Anthony Williams
Software Developer
Just Software Solutions Ltd

Boost list run by bdawes at, gregod at, cpdaniel at, john at