
i have more information about my problem:
I have add '-L/usr/lib' as my library path during linking and i make
sure i have 'libboost_thread*' library in '/usr/lib', but it still
does not work. Any idea why?
g++ -L/usr/lib -o"sandbox" ./thread.o
./thread.o: In function `__tcf_1':../thread.cpp:9: undefined reference
to `boost::mutex::~mutex()'
./thread.o: In function
`__static_initialization_and_destruction_0':../thread.cpp:9: undefined
reference to `boost::mutex::mutex()'
./thread.o: In function `main':../thread.cpp:90: undefined reference
to `boost::thread::thread(boost::function0
Hi,
I am trying to compile the boost thread that I found here: http://www-eleves-isia.cma.fr/documentation/BoostDoc/boost_1_29_0/libs/threa...
But i get the following error:
Can you please tell me what do i need to do to fix it?
./thread.o: In function `main':../thread.cpp:27: undefined reference to `boost::thread::thread(boost::function0
boost::function_base > const&)' :../thread.cpp:28: undefined reference to `boost::thread::join()' :../thread.cpp:28: undefined reference to `boost::thread::~thread()' :../thread.cpp:28: undefined reference to `boost::thread::~thread()' ./thread.o: In function `thread_alarm::operator()()':../thread.cpp:11: undefined reference to `boost::xtime_get(boost::xtime*, int)' :../thread.cpp:14: undefined reference to `boost::thread::sleep(boost::xtime const&)' collect2: ld returned 1 exit status make: *** [sandbox] Error 1 make: Target `all' not remade because of errors. Build complete for project sandbox