Boost logo

Boost Users :

Subject: Re: [Boost-users] subject:[Thread] undefined reference to `boost::thread::thread......
From: xiaofeng liao (gliaoxf_at_[hidden])
Date: 2008-11-06 01:49:19

Thanks Anthony very much.

> This is a clue: pthread_setspecific is part of the pthread library,
> not Boost.Thread. On linux, the thread library depends on the pthreads
> library, so you also need -lpthread on your command line.
> c++ -I /usr/local/boost_1_37_0 thre.cpp -o thre \
> /usr/local/boost_1_37_0/lib/libboost_thread-gcc41-mt-1_37.a -lpthread

It really works. No errors anymore.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at