Boost logo

Boost Users :

Subject: [Boost-users] using boost::thread with Sun Studio C++ gives error
From: Maróy Ákos (akos_at_[hidden])
Date: 2009-11-21 07:31:45


Hi,

I'm trying to compile a code which uses the boost thread library, but I
get the following error:

CC -library=stlport4 -features=tmplife -features=tmplrefstatic -mt -c -o
t t.cpp
"/opt/boost/include/boost/thread/pthread/mutex.hpp", line 142: Error:
The function "pthread_mutex_timedlock" must have a prototype.
"/opt/boost/include/boost/thread/pthread/mutex.hpp", line 142: Error:
The function "pthread_mutex_timedlock" must have a prototype.
"/opt/boost/include/boost/thread/detail/thread.hpp", line 344: Error:
boost::thread::thread(boost::thread&) is not accessible from
boost::move(boost::detail::thread_move_t<boost::thread>).
"/opt/boost/include/boost/thread/pthread/recursive_mutex.hpp", line 179:
Error: The function "pthread_mutex_timedlock" must have a prototype.
"/opt/boost/include/boost/thread/pthread/recursive_mutex.hpp", line 179:
Error: The function "pthread_mutex_timedlock" must have a prototype.
5 Error(s) detected.
make: *** [t] Error 5

the sample source code in question here just a single include:

#include <boost/thread.hpp>

This is with boost 1.40.0. I wonder what I'm doing wrong..

Akos


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