openCV 2.4.13 iOS background_segm.hpp 'list' file not found

最近下载了最新版的OpenCV的Framework。

导入到项目里边,编译。然后就出现了问题

/opencv2.framework/Headers/video/background_segm.hpp:47:10: 'list' file not found

#include 中的list没有。。。。。

google了一圈也没有找到好的解决办法。

然后好好的回忆了一下list好像是C++的一个标准库。

然后就简单的尝试了一下
#ifdef __cplusplus #endif

然后编译就通过了。算了我去笑一会。。

具体修改代码

#ifndef __OPENCV_BACKGROUND_SEGM_HPP__
#define __OPENCV_BACKGROUND_SEGM_HPP__

#ifdef __cplusplus
#include "opencv2/core/core.hpp"
#include <list>
namespace cv
{
    …
}
#endif
#endif

 

最后记得添加libc++.tdb文件到项目中。

(如果是老版本的话就添加libc++.dylib)

 

好了,编译通过。该做一个项目了。

posted on 2016-06-21 22:52  dinghing  阅读(2004)  评论(0编辑  收藏  举报

导航