符号(S)没有发现有关OpenCV的i386硬件架构 [英] symbol(s) not found for architecture i386 about opencv
问题描述
我学习OpenCV进行now.After我从github.com/macmade下载例如codeS IOS,我complie并运行程序,一切正常。然而,当我加入一些OpenCV的codeS波纹管:
I am studying opencv for ios now.After I download example codes from github.com/macmade, i complie and run the program, everything is OK. However, when i add some opencv codes as bellow:
IplImage* img = 0;
int height,width,step,channels;
uchar* data;
int hIndex,wIndex,cIndex;
img = cvLoadImage("tapme.png",CV_LOAD_IMAGE_COLOR);
if (!img) {
NSLog(@"img cannot load");
return;
}
height = img->height;
width = img->width;
step = img->widthStep;
channels = img->nChannels;
data = (uchar*)img->imageData;
NSLog(@"%d:%d:%d:%d",height,width,step,channels);
然后我重新编译程序,一切都OK了。但是,在连接时,当错误发生:
Then i compile the program again, everything is OK too. But when errors happen when linking:
Undefined symbols for architecture i386:
"_cvLoadImage", referenced from:
-[MainViewController showPic:] in MainViewController.o
我曾尝试在计算器几乎所有的方法,但结果仍然不是那么好。任何人有一个好主意,修复bug,等待乌拉圭回合的帮助和感谢ü。
I have tried almost all methods in stackoverflow, but the result is still not so good. Anyone have a good idea to fix the bug, waiting for ur help and thank u.
推荐答案
在构建模拟器,链接器将需要i386架构库。当你建立了一个装置,连接器将需要ARM架构库。难道你的模拟器构建设置指向正确的库?
When you build for the simulator, the linker will need a library for i386 architecture. When you build for a device, the linker will need a library for arm architecture. Do your simulator build settings point to the correct library?
这篇关于符号(S)没有发现有关OpenCV的i386硬件架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!