问题描述
我正在尝试构建此项目,但其显示在错误下方,
I am trying to build this project, but its display below error,
Undefined symbols for architecture i386:
"cv::merge(std::vector<cv::Mat, std::allocator<cv::Mat> > const&, cv::_OutputArray const&)", referenced from:
-[RRMainViewController colorSobelEdge:isVertical:] in RRMainViewController.o
"cv::split(cv::Mat const&, std::vector<cv::Mat, std::allocator<cv::Mat> >&)", referenced from:
-[RRMainViewController colorSobelEdge:isVertical:] in RRMainViewController.o
"cv::Exception::Exception(int, std::string const&, std::string const&, std::string const&, int)", referenced from:
-[RRMainViewController floodFillPostprocess:WithColor:] in RRMainViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已添加OpenCV.framework并将此行添加到.pch文件中
I have added OpenCV.framework and added this line in .pch file
#ifdef __cplusplus
#import <opencv2/opencv.hpp>
#endif
将此库添加到项目中
但是仍然出现错误..请帮助...提前谢谢..
But still got above error.. please help... thanx in advance..
这是我的构建阶段的屏幕截图
Here is the screenshot for my Build phase
================================================ ==================
已解决
@karthika的此答案对我有所帮助.
=================================================================
SOLVED
This answer by @karthika has helped me.
推荐答案
Opencv框架或某些其他文件未在构建阶段添加.转到项目设置->构建阶段->与库链接二进制文件,然后检查列表中是否存在opencv.否则,请点击+并将其添加然后进入构建阶段以编译源代码,并确保RRMainViewController.m存在于列表中.否则,请点击+并将其添加
Opencv framework or some other files are not added in the build phases. Go to project settings->Build phases->Link binary with libraries and check if opencv exists in the list. Otherwise click on + and add itThen go in the build phases to compile sources and make sure RRMainViewController.m is present in the list. Otherwise click on + and add it
此答案可能也对您有帮助:未定义的建筑符号i386:_OBJC_CLASS _ $ _ SKPSMTPMessage",引用自:错误
This answer may help you too: Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error
这篇关于体系结构i386的未定义符号:用于OpenCV项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!