1. Problem:
My boost version is boost_1_49_0, and System is Centos6.3its build step is following and
it will auto create the library in the /usr/local/lib,
and the include files in /usr/local/include/boost:
- su -
- ./bootstrap.sh
- ./b2
- ./b2 link=static runtime-link=static stage install
But when I use this information to compile my project,
it is happen the following error
/home/Andy/IBMS/Software/tophat/develop/tophat-2.0.4/src/segment_juncs.cpp:4926: undefined reference to `boost::thread::join()'
/home/Andy/IBMS/Software/tophat/develop/tophat-2.0.4/src/segment_juncs.cpp:4927: undefined reference to `boost::thread::~thread()'
/home/Andy/IBMS/Software/tophat/develop/tophat-2.0.4/src/segment_juncs.cpp:5003: undefined reference to `boost::thread::join()'
/home/Andy/IBMS/Software/tophat/develop/tophat-2.0.4/src/segment_juncs.cpp:5004: undefined reference to `boost::thread::~thread()'
It seems like the thread error.
2. Solution:
I find the google and the key point is
add the
-lboost_thread-mt
to my gcc,
and then it will pass the problem.
Reference:
Boost Error Undefined
沒有留言:
張貼留言