我在Red Hat Linux rel 5.5上使用g ++ 4.1.2和Boost 1.53。鏈接過程中有一個問題,我不清楚。我得到的錯誤信息:鏈接階段使用Boost 1.53時未定義的引用
/usr/local/boost_1_53_0/stage/lib/libboost_thread.so:
undefined reference to `std::bad_exception::what() [email protected]_3.4.9'
/usr/local/boost_1_53_0/stage/lib/libboost_thread.so:
undefined reference to `std::bad_alloc::what() [email protected]_3.4.9'
collect2: ld returned 1 exit status
似乎有可能與我與鏈接libstdc++.so
文件版本的一個問題。如果我交替隱藏並顯示這個文件,我可以讓我的程序鏈接。但是,我希望能夠像我在引入Boost庫和併發線程之前一樣「製作」。
如果您有任何見解,請幫助解決此問題。
你能顯示你的鏈接器命令行嗎? –