Ios 静态库';的链接器命令失败错误;libiphone exif.a';

Ios 静态库';的链接器命令失败错误;libiphone exif.a';,ios,iphone,ios7,static-libraries,Ios,Iphone,Ios7,Static Libraries,我已经下载了一个源代码,它附在我的邮件中。有一个名为“libiphone exif.a”的静态库不工作&显示错误。然后我从code.google.com下载了这个库,并通过“链接二进制与库”添加了它,但现在我无法构建它,它显示了以下错误: ld: warning: ignoring file /Users/codemenmini2012-2/Downloads/iphone-exif-0-9/Release- iphoneos/libiphone-exif.a, file was buil

我已经下载了一个源代码,它附在我的邮件中。有一个名为“libiphone exif.a”的静态库不工作&显示错误。然后我从code.google.com下载了这个库,并通过“链接二进制与库”添加了它,但现在我无法构建它,它显示了以下错误:

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)

我从下面的链接下载了图书馆,在其中我找到了图书馆的两个文件夹,

1) 发布iphoneos

2) 发布模拟器iphonesimulator

因此,当您在模拟器(i386架构)中运行它时,请使用Release simulator iphonesimulator文件夹中的.a文件,当您运行它以供设备使用时,请使用Release iphoneos中的.a文件

试着这样做,如果你有任何错误,请告诉我

创建通用库并重试

  • 开放式终端
  • Cd到您的iphone ex下载文件夹
  • lipo-arch i386发布模拟器iphonesimulator/libiphoneexif.a-arch armv6发布iphoneos/libiphoneexif.a-create-output libiphone exif universal.a

在此之后,在项目中使用libiphone exif universal.a。

签出目标->构建设置-serch path已设置静态路径多次添加了多个文件。检查此项:-一次查看是否导入了
PictureViewController.m
,而不是
PictureViewController.h
,这表明文件是正确的缺少架构i386(模拟器),在设备上运行它可能会在设备上成功运行。你是指静态库吗?我做了这个,但还是同样的错误!检查编辑的注释。