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平台设备,在模拟器上运行对应的程序,以方便你没有实体设 ...
随机推荐
- 20.策略者模式(Stragety Pattern)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- JavaWeb学习之JSP常用标签、EL表达式的运算符、JSTL标签库(6)
1.JSP常用标签 * 只要支持JSP文件,常用标签有可以直接使用 * 格式: jsp:xxxx * jsp:forward ,完成jsp页面的转发 * page属性:转发的地址 <% requ ...
- GoLang文件增删遍历基本操作
先学一学GO语言实用的一面. package main import ( "path/filepath" "flag" "os" " ...
- 攻城狮在路上(叁)Linux(十六)--- 命令与文件的查找
一.脚本文件的查询: 1.命令格式:which [-a] command; <==通过PATH来查找. -a:列出所有的,而不是仅列出第一个. 示例: which ifconfig; 注意:由于 ...
- 杂物 python (一)
python 是一门语言,有各种不同的实现.CPython 即用c语言实现Python及其解释器.
- PHP保留小数位的三种方法
/** * PHP保留两位小数的几种方法 * @link http://www.phpddt.com */ $num = 10.4567; //第一种:利用round()对浮点数进行四舍五入 echo ...
- (五)WebRTC手记Channel概念
转自:http://www.cnblogs.com/fangkm/p/4401075.html 前面两篇博文完整地介绍了WebRTC音视频的采集模块,接下来应该开始介绍关键的音视频编码模块.不过在介绍 ...
- view的setTag() 和 getTag()应用 (转)
原文地址:http://www.cnblogs.com/qingblog/archive/2012/07/03/2575140.html View中的setTag(Onbect)表示给View添加一个 ...
- 用 C# 实现一个简单的 Rest Service 供外部调用
用 C# 实现一个简单的 Restful Service 供外部调用,大体总结为4点: The service contract (the methods it offers). How do yo ...
- Codeforces Round #229 (Div. 2) C. Inna and Candy Boxes 树状数组s
C. Inna and Candy Boxes Inna loves sweets very much. She has n closed present boxes lines up in a ...