2011-08-25 35 views
2

我們在我們的C++項目中使用boost1.46.1。當我使用cmake構建我的C++項目時,出現以下錯誤。C++ boost構建錯誤

我不知道爲什麼我得到這個錯誤。任何人都可以請我麻煩解決以下錯誤?

/usr/bin/ld: warning: libicuuc.so.44, needed by /efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so, not found (try using -rpath or -rpath-link) 
/usr/bin/ld: warning: libicui18n.so.44, needed by /efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so, not found (try using -rpath or -rpath-link) 
/usr/bin/ld: warning: libicudata.so.44, needed by /efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so, not found (try using -rpath or -rpath-link) 
/efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so: undefined reference to `u_isspace_44' 
/efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so: undefined reference to `icu_44::Collator::createInstance(icu_44::Locale const&, UErrorCode&)' 
/efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so: undefined reference to `u_charFromName_44' 
/efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so: undefined reference to `u_charType_44' 
/efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so: undefined reference to `u_digit_44' 
/efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so: undefined reference to `u_tolower_44' 
/efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so: undefined reference to `icu_44::Locale::~Locale()' 
/efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so: undefined reference to `u_isblank_44' 
/efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so: undefined reference to `icu_44::Locale::Locale()' 
/efs/dist/fsf/boost/1.46.1-build001/.exec/x86-32.rhel.5/rh346/lib/libboost_regex.so: undefined reference to `icu_44::Locale::Locale(icu_44::Locale const&)' 
collect2: ld returned 1 exit status 
+1

boost :: regex庫不僅是頭文件,你確定共享庫已經建立並且對鏈接器可見嗎? – Praetorian

回答

1

你Boost.Regex是建立與Unicode支持 - 你需要鏈接到ICU爲好。

+0

關於你的答案的幾個問題: 你怎麼知道的? 我該如何測試才能確定? 我如何鏈接到ICU? – petric