我需要在我的 iOS 项目中使用 boost 框架。我的第一个任务是为 Ios 工作获得动力。我尝试使用这个脚本
http://goodliffe.blogspot.co.uk/2010/09/building-boost-framework-for-ios-iphone.html
但由于 lipo 错误(?)而无法构建,并且无法弄清楚如何解决它。我寻找了一个预编译的框架,并在 github 上遇到了这个项目:
https://github.com/danomatika/ofxLua
lib 部分包含一个 Ios 版本的 boost。所以我尝试在我的项目中使用它
但是现在当我构建我的项目时,我遇到了这些错误:
Undefined symbols for architecture i386:
"vtable for boost::filesystem::detail::utf8_codecvt_facet", referenced from:
(anonymous namespace)::path_locale() in boost(path.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"_inflate", referenced from:
MatlabIO::uncompressVariable(unsigned int&, unsigned int&, unsigned int&, std::vector<char, std::allocator<char> > const&) in MatlabIO.o
"_inflateEnd", referenced from:
MatlabIO::uncompressVariable(unsigned int&, unsigned int&, unsigned int&, std::vector<char, std::allocator<char> > const&) in MatlabIO.o
"_inflateInit_", referenced from:
MatlabIO::uncompressVariable(unsigned int&, unsigned int&, unsigned int&, std::vector<char, std::allocator<char> > const&) in MatlabIO.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我还想说明我安装了 boost 使用
sudo port install boost
在我的 xcode 项目下,我没有链接到 /usr/local/include/boost/ 或类似的东西。似乎它正在使用不正确的架构进行编译。
有什么解决办法吗?也许框架不是为 Ios 编译的?或者我的项目没有引用正确的版本