【发布时间】:2013-12-19 06:50:15
【问题描述】:
我已经下载了一个源代码,它附在我的邮件中。有一个名为“libiphone-exif.a”的静态库无法正常工作并显示错误。然后我从 code.google.com 下载了该库并通过“Link Binary With Libraries”添加了它,但现在我无法构建它并且它显示以下错误:
ld: warning: ignoring file /Users/codemenmini2012-2/Downloads/iphone-exif-0-9/Release- iphoneos/libiphone-exif.a, file was built for archive which is not the architecture being linked (i386): /Users/codemenmini2012-2/Downloads/iphone-exif-0-9/Release-iphoneos/libiphone-exif.a
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_EXFGPSLoc", referenced from:
objc-class-ref in PictureViewController.o
"_OBJC_CLASS_$_EXFJpeg", referenced from:
objc-class-ref in PictureViewController.o
"_OBJC_CLASS_$_EXFUtils", referenced from:
objc-class-ref in PictureViewController.o
"_OBJC_CLASS_$_EXFraction", referenced from:
objc-class-ref in PictureViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
【问题讨论】:
-
文件已添加多次。
-
看看你是否导入了
PictureViewController.m而不是PictureViewController.h -
显示i386架构(模拟器)的文件丢失,在设备上运行它可能会在设备上成功运行。
-
你说的是静态库吗?
标签: ios iphone ios7 static-libraries