
6 Nov
2008
6 Nov
'08
6:49 a.m.
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.