我必须为线程构建boost库。所以我下达了命令
./bootstrap.sh
在 boost_1_46_1 目录中。然后
bjam --toolset=gcc --build-type=complete --with-thread link=static stage
当我尝试使用下面的命令编译一个涉及线程的简单程序时,我得到了错误。
g++ -I/home/sharatds/Downloads/boost_1_46_1 /home/sharatds/Downloads/boost_1_46_1/stage/lib/libboost_thread.a main.cpp -o ini
main.cpp:(.text+0x804): undefined reference to `boost::thread::join()'
main.cpp:(.text+0x9ec): undefined reference to `boost::thread::~thread()'
我错过了什么吗?