xcode 编译opencv ios容易出现的错误
(1)出现 "std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()"之类的错误
Undefined symbols for architecture i386:
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from:
cv::gpu::error(char const*, char const*, int, char const*) in opencv2(gpumat.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in opencv2(gpumat.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in opencv2(gpumat.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(int)", referenced from:
cv::gpu::error(char const*, char const*, int, char const*) in opencv2(gpumat.o)
"std::__1::cerr", referenced from:
解决办法是加入c++库 ,想项目中加入libc++.dylib
- Select your project (the blue file) in your project navigator (Command 1 if it's hidden)
- Select your target
- Go to Build Phases
- Expand "Link Binary With Libraries"
- Click the "+"
- Type libc++.dylib in the search bar.
- Select the libc++.dylib file and press "Add"
(2)出现下面错误
"_CVPixelBufferGetBaseAddress", referenced from:
-[MainViewController imageFromSampleBuffer:] in MainViewController.o
"_CVPixelBufferUnlockBaseAddress", referenced from:
-[MainViewController imageFromSampleBuffer:] in MainViewController.o
"_CVPixelBufferLockBaseAddress", referenced from:
-[MainViewController imageFromSampleBuffer:] in MainViewController.o
"_CMSampleBufferGetImageBuffer", referenced from:
-[MainViewController imageFromSampleBuffer:] in MainViewController.o
"_CVPixelBufferGetHeight", referenced from:
-[MainViewController imageFromSampleBuffer:] in MainViewController.o
"_kCVPixelBufferPixelFormatTypeKey", referenced from:
_kCVPixelBufferPixelFormatTypeKey$non_lazy_ptr in MainViewController.o
(maybe you meant: _kCVPixelBufferPixelFormatTypeKey$non_lazy_ptr)
"_CVPixelBufferGetWidth", referenced from:
-[MainViewController imageFromSampleBuffer:] in MainViewController.o
"_CVPixelBufferGetBytesPerRow", referenced from:
-[MainViewController imageFromSampleBuffer:] in MainViewController.o
"_CMTimeMake", referenced from:
-[MainViewController setupCaptureSession] in MainViewController.o
"_CVPixelBufferGetDataSize", referenced from:
-[MainViewController imageFromSampleBuffer:] in MainViewController.o
解决方法是添加 AVFoundation , CoreVideo 和 CoreMedia frameworks
(3)出现下面错误assert错误时,需要添加AssetsLibrary.framework
xcode 编译opencv ios容易出现的错误的更多相关文章
- Xcode编译Undefined symbols for architecture xxx 错误总结
可能会遇到这几种错误:Undefined symbols for architecture armv7Undefined symbols for architecture armv7sUndefine ...
- ios下编译opencv
如果想要在ios下编译opencv 需要安装Cmake 这里通过homebrew 来安装cmake ios下打开终端然后先安装 homebrew :(mac 下自带ruby) ruby -e &quo ...
- 在Xcode 6 beta里编译Cocos2d-x iOS项目时失败
转载 在Xcode 6 beta里编译Cocos2d-x iOS项目时可能会失败,提示如下错误: Undefined symbols for architecture i386: "_fwr ...
- 解决Xcode 6 编译Cocos2d-x iOS项目失败
在Xcode 6 beta里编译Cocos2d-x iOS项目时可能会失败,提示如下错误: Undefined symbols for architecture i386: "_fwrite ...
- iOS——为Xcode编译POCO C++静态库
一.POCO C++ library简介 POCO C++ library是一个C++编写的跨平台库,主要实现网络连接.数据库管理以及服务器,适用于跨平台.嵌入式. 二.为Xcode编译POCO C+ ...
- linker command failed with exit code 1 (use -v to see invocation),经典Xcode编译错误的出现和解决!
linker command failed with exit code 1 (use -v to see invocation)这个肯定是个xcode编译运行的时候经典的报错了. 这个问题曾经在我的 ...
- iOS进阶--提高XCode编译速度、Xcode卡顿解决方案
提升编译链接的速度主要有以下三个方式: 1. 提高XCode编译时使用的线程数 defaults write com.apple.Xcode PBXNumberOfParallelBuildSubta ...
- OpenCV iOS开发(一)——安装(转)
OpenCV是一个开源跨平台的的计算机视觉和机器学习库,可以用来做图片视频的处理.图形识别.机器学习等应用.本文将介绍OpenCV iOS开发中的Hello World起步. 安装 OpenCV安装的 ...
- 【转】Xcode中的iOS模拟器(iOS Simulator)的介绍和使用心得
iOS模拟器简介 iOS功能简介 iOS模拟器,是在Mac下面开发程序时,开发iOS平台的程序时候,可以使用的辅助工具. 其功能是,帮你模拟iOS平台设备,在模拟器上运行对应的程序,以方便你没有实体设 ...
随机推荐
- jQueryEasyUi验证
多重验证: { field : 'startPort', title : "起始端口", editor: "text", width : 50, edi ...
- 与你相遇好幸运,CentOS 7 x86_64使用Yum安装PostgreSQL
访问http://yum.pgrpms.org/reporpms/repoview/letter_p.group.html,下载并安装和当前系统对应的rpm文件. wget https://downl ...
- 64位Ubuntu运行32位程序时报文件不存在(No such file or Directory)的一种解决办法
尝试在64位Ubuntu下面运行32位程序时, 一直说 文件不存在(No such file or directory), 我只想说++. 你tm说个文件格式不正确不就好了? 非得说个文件不存在! 真 ...
- Linux环境下stl库使用(vector)
step1: #include <iostream> #include <vector> #include <string> using namespace std ...
- VS2015 Preview Secondary Installer 离线安装
VS2015 Preview Secondary Installer 离线安装 天朝的原因orz, 装过vs2015 preview 的人都懂的,第二阶段安装会失败.假公济私的研究了下VS2015,摸 ...
- 7-15ALL、 ANY、SOME子查询
ALL:所有 ANY:部分 SOME:与ANY相同,使用ANY的地方都可以用SOME替换. >ALL:父查询中列的值必须大于子查询返回的值列表的每一个值. >ANY:父查询中的返回值必须大 ...
- hdu 4043 2011北京赛区网络赛D 概率+大数 **
推出公式为:P = A(2n,n)/(2^(2n)*n!) 但是不会大数,学完java再补
- windbg的高级玩法
详见附件 jpg改zip
- Hbase原理、基本概念、基本架构
来源:http://blog.csdn.net/woshiwanxin102213/article/details/17584043 概述 HBase是一个构建在HDFS上的分布式列存储系统:HBas ...
- java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory 解决方案
缺少 commons-logging.jar