链接器命令失败,退出代码为1(使用-v查看调用)

时间:2016-02-24 04:53:05

标签: ios objective-c xcode clang xcode7

我的应用在某些设备模拟器中工作,有些人给我一个错误:

 ld: warning: ignoring file /Users/username/Documents/projectname/libSVGKit-iOS.2.0.0.a, 
  missing required architecture i386 in file /Users/wendy/Documents/projectname/libSVGKit-iOS.2.0.0.a (2 slices)

 Undefined symbols for architecture i386:
    "_OBJC_CLASS_$_SVGKFastImageView", referenced from:
  objc-class-ref in FrontView.o
    "_OBJC_CLASS_$_SVGKImage", referenced from:
  objc-class-ref in FrontView.o
 ld: symbol(s) not found for architecture i386
 clang: error: linker command failed with exit code 1 (use -v to seeinvocation)

我一直在寻找相当长的一段时间,我仍然对如何解决这个问题一无所知,有人可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

 Undefined symbols for architecture i386:
    "_OBJC_CLASS_$_SVGKFastImageView", referenced from: 

这告诉我们i386架构(模拟器)的实现缺失。如果您非常确定库已正确添加,

1)在设备中尝试相同的过程。

2)重建你的库以用于模拟器并添加它以在模拟器上运行它。