2012-09-24 36 views
0

我需要在iOS项目中使用boost框架。我的第一个任务是为Ios工作。我尝试使用这个脚本在ios项目中使用boost框架和opencv时编译错误

http://goodliffe.blogspot.co.uk/2010/09/building-boost-framework-for-ios-iphone.html

但不能建造由于脂错误(?),并无法弄清楚如何解决它。我找了一个预编译的框架,并就翻过这个项目在GitHub上:

https://github.com/danomatika/ofxLua

没有包含在lib部分提升的IOS版本。于是,我就用它在我的项目

但现在当我建立我的项目,我收到这些错误:

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) 

我也想清楚地表明我安装使用升压

sudo port install boost 

并在我的xcode项目下,我没有链接到/ usr/local/include/boost /或类似的东西。它似乎正在编译不正确的架构。

任何解决方案?也许这个框架没有为Ios编译?或者是我的项目不引用正确的版本

+0

建立两个该库,模拟器和设备 - 然后用脂加入两个版本,你的应用程序中使用生成的(通用)库。 – Till

+0

无法建立。你有脚本还是要下载的地方? –

+0

查看我的回答@AvnerBarr。包含构建脚本(也包括静态库,请参阅即插即用选项的发布)(特别是对于OpenFrameworks项目; D) – Danoli3

回答

0

您还可以使用升压1.57.0与ofxiOSBoost静态库和头文件: https://github.com/danoli3/ofxiOSBoost

发布的libc中++(C++ 11)的libstdC++。

所有的构建脚本都在/脚本文件夹(更新彼得Goodliffe脚本)