我将系统从 10.8 升级到 10.9,并相应地将 xcode 从 5.0 升级到 5.0.1。
当我尝试运行将多个 .a 文件组合成一个更大的共享库的构建的一部分时,我得到了回报:
Undefined symbols for architecture x86_64:
"__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm", referenced from:
__ZN2bt3fst12FstLookupSet14loadFromStringERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_ in libbtfst.a(bt_fst_factory.o)
过滤后的问题符号是:
__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find_first_of(char const*, unsigned long, unsigned long) const
链接命令行如下所示:
libtool -macosx_version_min 10.6 -headerpad_max_install_names -dynamic -multiply_defined suppress -install_name `basename ../../../../rlp/lib/amd64-darwin12-xcode5/libbtutils.dylib` -o ../../../../rlp/lib/amd64-darwin12-xcode5/libbtutils.dylib -g <long list of .a files> -lstdc++.6 -lSystem