0

我已经设法为 iOS 项目编译Swiften库,但现在我遇到了与Boost库相关的链接错误。

我已经Boost按照这些步骤进行了编译,链接过程中出现的错误是:

Undefined symbols for architecture arm64:
"vtable for boost::filesystem::detail::utf8_codecvt_facet", referenced from:
  __GLOBAL__I_a in boost(path.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

我读过一些文章,建议包括一些编译参数,但不确定哪些参数或我应该把它们放在哪里。我也到达了这个线程,但没有解决方案。还有其他人遇到过这个问题吗?有人成功编译和运行 iOS 版 Swiften 吗?任何关于正确方向的提示将不胜感激。

更新 1

似乎filesystemprogram_options库共享utf8_codecvt_facet对象,并且一个在构建时覆盖了另一个boost。最后,我设法编译了整个Swiften库,但是当我尝试使用它时,我得到了更多的链接错误:(当我JID在我的主类上声明一个对象时出现这个错误:

Undefined symbols for architecture armv7: 
"Swift::StringPrep::getPrepared(std::__1::basic_string<char, 
std::__1::char_traits<char>, std::__1::allocator<char> > const&, 
Swift::StringPrep::Profile)", referenced from:
Swift::JID::nameprepAndSetComponents(std::__1::basic_string<char, 
std::__1::char_traits<char>, std::__1::allocator<char> > const&, 
std::__1::basic_string<char, std::__1::char_traits<char>, 
std::__1::allocator<char> > const&, std::__1::basic_string<char, 
std::__1::char_traits<char>, std::__1::allocator<char> > const&) in JID.o
4

0 回答 0