要构建和安装OpenCv2.2,我按照此处的说明操作:http://computer-vision-talks.com/2011/02/building-opencv-for-iphone-in-one-click/,http://computer-vision-talks.com/2011/01/using-opencv-in-objective-c-code/ OpenCv的构建脚本似乎工作正常..但在将库和头文件添加到我的XCode4项目后,我仍然遇到同样的问题:
/opencv/include/opencv2/ml/ml.hpp
opencv/include/opencv2/ml/ml.hpp:2075:15: error: map: No such file or directory
opencv/include/opencv2/ml/ml.hpp:2076:18: error: string: No such file or directory
opencv/include/opencv2/ml/ml.hpp:2077:20: error: iostream: No such file or directory
opencv/include/opencv2/ml/ml.hpp:2084: error: expected specifier-qualifier-list before 'public'
opencv/include/opencv2/ml/ml.hpp:2106: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CvMLData'
opencv/include/opencv2/ml/ml.hpp:2186: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cv'
我已经尝试将#include <opencv2/opencv.hpp>
添加到我的***-Prefix.pch
文件并添加了链接器标记:-lstdc++ -lz
,但仍然存在这些错误..任何想法?
答案 0 :(得分:0)
下载opencv 2.0的预编译静态库 http://computer-vision-talks.com/download/opencv_build_ios_4771.zip
来自https://github.com/niw/iphone_opencv_test的和标题 为我工作:))