I am trying to compile and use the Boost 1.54 libraries and have run into a deadend.
I compiled and installed the libraries like mentioned in the documentation:
./bootstrap.sh
./b2 install
I even tried a complete reinstall using:
./bootstrap.sh
./b2 threading=multi install
I have linked using -lboost_thread
and -L*path
to boost*/bin.v2/libs
I am still getting the following linker errors:
undefined reference to boost::thread::start_thread_noexcept()
undefined reference to boost::thread::join_noexcept()
I am using gcc 4.6.3 on Ubuntu 12.04 in Eclipse.
Does anyone know how I can fix this?
After quite a bit of pain with the default boost on ubuntu repositories, I installed boost 1.54.0 (from the official webpage) with the default options, and the following worked for me:
g++ test.cpp -o test -L/usr/local/lib/ -lboost_thread
P.S: On Ubuntu 12.04, gcc 4.63.
P.S2: Included in my test.cpp
are:
#include "boost/thread/thread.hpp"
#include "boost/bind.hpp"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With