以下代码:
#include <boost/locale.hpp>
int main()
{
using namespace boost::locale;
generator gen;
}
内置有以下标志:
g++ -static -static-libstdc++ -pthread main.cpp -lboost_locale -lboost_system -licuuc -licudata -licui18n
无法链接并显示以下错误:
(.text+0x16b8): undefined reference to `icu_60::CacheKeyBase::~CacheKeyBase()'
(.text+0x1c8d): undefined reference to `icu_60::UVector64::~UVector64()'
(.text+0x7dc): undefined reference to `icu_60::UCharsTrie::Iterator::~Iterator()'
...hundreds of other undefined symbols
...(the sample code also has boost linking errors, but let's ignore them, as they only appear in my attempt of reproduction; the real code I have issues with has only icu-related link errors)
我正在使用Ubuntu 18.04,并且已从Ubuntu存储库中安装了libboost-all-dev
和libicu-dev
。
我可能缺少使它链接在一起所需的一些琐碎组件/标志/库,但是找不到它。