Cocoapods / Eureka编译错误:链接器命令因退出1而失败

时间:2016-08-11 10:05:25

标签: ios swift xcode cocoapods eureka-forms

我有一个我正在研究的iOS项目。我做的最后一件事是归档应用程序的工作版本并上传到应用程序商店。

我从那时起第一次重新开放这个项目,发现我无法编译项目,尽管没有做任何改动。

我尝试过:为此目标创建一个新方案,将Eureka框架添加到" Link Binary with Libraries"在Build Phases中,删除Eureka框架并在Cocoapods中再次添加它。

我最近更改了产品名称,但在执行此操作后能够编译和归档应用程序。

编译错误:

Ld /Users/iMac2/Library/Developer/Xcode/DerivedData/ParentNews-geljdkdldttkfccjdbidfttuyfho/Build/Products/Debug-iphonesimulator/ParentNews.app/ParentNews normal x86_64
cd /Users/iMac2/Desktop/ParentNews
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -L/Users/iMac2/Library/Developer/Xcode/DerivedData/ParentNews-geljdkdldttkfccjdbidfttuyfho/Build/Products/Debug-iphonesimulator -F/Users/iMac2/Library/Developer/Xcode/DerivedData/ParentNews-geljdkdldttkfccjdbidfttuyfho/Build/Products/Debug-iphonesimulator -F/Users/iMac2/Library/Developer/Xcode/DerivedData/ParentNews-geljdkdldttkfccjdbidfttuyfho/Build/Products/Debug-iphonesimulator/Eureka -filelist /Users/iMac2/Library/Developer/Xcode/DerivedData/ParentNews-geljdkdldttkfccjdbidfttuyfho/Build/Intermediates/ParentNews.build/Debug-iphonesimulator/ParentNews.build/Objects-normal/x86_64/ParentNews.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=8.0 -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -framework Eureka -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/iMac2/Library/Developer/Xcode/DerivedData/ParentNews-geljdkdldttkfccjdbidfttuyfho/Build/Intermediates/ParentNews.build/Debug-iphonesimulator/ParentNews.build/Objects-normal/x86_64/ParentNews.swiftmodule -framework Pods_ParentNews -Xlinker -dependency_info -Xlinker /Users/iMac2/Library/Developer/Xcode/DerivedData/ParentNews-geljdkdldttkfccjdbidfttuyfho/Build/Intermediates/ParentNews.build/Debug-iphonesimulator/ParentNews.build/Objects-normal/x86_64/ParentNews_dependency_info.dat -o /Users/iMac2/Library/Developer/Xcode/DerivedData/ParentNews-geljdkdldttkfccjdbidfttuyfho/Build/Products/Debug-iphonesimulator/ParentNews.app/ParentNews
ld: warning: ignoring file /Users/iMac2/Library/Developer/Xcode/DerivedData/ParentNews-geljdkdldttkfccjdbidfttuyfho/Build/Products/Debug-iphonesimulator/Eureka.framework/Eureka, file was built for i386 which is not the architecture being linked (x86_64): /Users/iMac2/Library/Developer/Xcode/DerivedData/ParentNews-geljdkdldttkfccjdbidfttuyfho/Build/Products/Debug-iphonesimulator/Eureka.framework/Eureka
Undefined symbols for architecture x86_64:
"_OBJC_METACLASS_$__TtC6Eureka18FormViewController", referenced from:
  _OBJC_METACLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.viewDidLoad () -> ()", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
"Eureka.FormViewController.viewWillAppear (Swift.Bool) -> ()", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.prepareForSegue (__ObjC.UIStoryboardSegue, sender : Swift.AnyObject?) -> ()", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.viewDidDisappear (Swift.Bool) -> ()", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.textInputShouldClear <A where A: Swift.Equatable> (__ObjC.UITextInput, cell : Eureka.Cell<A>) -> Swift.Bool", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.textInputShouldReturn <A where A: Swift.Equatable> (__ObjC.UITextInput, cell : Eureka.Cell<A>) -> Swift.Bool", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.deleteAnimationForRows ([Eureka.BaseRow]) -> __C.UITableViewRowAnimation", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.insertAnimationForRows ([Eureka.BaseRow]) -> __C.UITableViewRowAnimation", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.reloadAnimationOldRows ([Eureka.BaseRow], newRows : [Eureka.BaseRow]) -> __C.UITableViewRowAnimation", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.rowValueHasBeenChanged (Eureka.BaseRow, oldValue : protocol<>?, newValue : protocol<>?) -> ()", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.textInputDidEndEditing <A where A: Swift.Equatable> (__ObjC.UITextInput, cell : Eureka.Cell<A>) -> ()", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.inputAccessoryViewForRow (Eureka.BaseRow) -> __ObjC.UIView?", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.textInputDidBeginEditing <A where A: Swift.Equatable> (__ObjC.UITextInput, cell : Eureka.Cell<A>) -> ()", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.textInputShouldEndEditing <A where A: Swift.Equatable> (__ObjC.UITextInput, cell : Eureka.Cell<A>) -> Swift.Bool", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.deleteAnimationForSections ([Eureka.Section]) -> __C.UITableViewRowAnimation", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.insertAnimationForSections ([Eureka.Section]) -> __C.UITableViewRowAnimation", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.reloadAnimationOldSections ([Eureka.Section], newSections : [Eureka.Section]) -> __C.UITableViewRowAnimation", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.textInputShouldBeginEditing <A where A: Swift.Equatable> (__ObjC.UITextInput, cell : Eureka.Cell<A>) -> Swift.Bool", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.textInput <A where A: Swift.Equatable> (__ObjC.UITextInput, shouldChangeCharactersInRange : __C._NSRange, replacementString : Swift.String, cell : Eureka.Cell<A>) -> Swift.Bool", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.init (coder : __ObjC.NSCoder) -> Eureka.FormViewController?", referenced from:
  ParentNews.FilterController.init (coder : __ObjC.NSCoder) -> ParentNews.FilterController? in FilterController.o
"Eureka.FormViewController.init (style : __C.UITableViewStyle) -> Eureka.FormViewController", referenced from:
  ParentNews.FilterController.init (style : __C.UITableViewStyle) -> ParentNews.FilterController in FilterController.o
"Eureka.FormViewController.init (nibName : Swift.String?, bundle : __ObjC.NSBundle?) -> Eureka.FormViewController", referenced from:
  ParentNews.FilterController.init (nibName : Swift.String?, bundle : __ObjC.NSBundle?) -> ParentNews.FilterController in FilterController.o
"Eureka.FormViewController.navigationOptions.getter : Eureka.RowNavigationOptions?", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.navigationAccessoryView.getter : Eureka.NavigationAccessoryView", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.form.getter : Eureka.Form", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.tableView.getter : __ObjC.UITableView?", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.(oldBottomInset in _1131D9CFD9D297ADC9C1EFB9DC530585).getter : CoreGraphics.CGFloat?", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.(tableViewStyle in _1131D9CFD9D297ADC9C1EFB9DC530585).getter : __C.UITableViewStyle", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.(_form in _1131D9CFD9D297ADC9C1EFB9DC530585).getter : Eureka.Form", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.navigationOptions.materializeForSet : Eureka.RowNavigationOptions?", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.form.materializeForSet : Eureka.Form", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.tableView.materializeForSet : __ObjC.UITableView?", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.(oldBottomInset in _1131D9CFD9D297ADC9C1EFB9DC530585).materializeForSet : CoreGraphics.CGFloat?", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.(tableViewStyle in _1131D9CFD9D297ADC9C1EFB9DC530585).materializeForSet : __C.UITableViewStyle", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.navigationOptions.setter : Eureka.RowNavigationOptions?", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.navigationAccessoryView.setter : Eureka.NavigationAccessoryView", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.form.setter : Eureka.Form", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.tableView.setter : __ObjC.UITableView?", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.(oldBottomInset in _1131D9CFD9D297ADC9C1EFB9DC530585).setter : CoreGraphics.CGFloat?", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.(tableViewStyle in _1131D9CFD9D297ADC9C1EFB9DC530585).setter : __C.UITableViewStyle", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.FormViewController.(_form in _1131D9CFD9D297ADC9C1EFB9DC530585).setter : Eureka.Form", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"Eureka.Section.__allocating_init (Swift.String, (Eureka.Section) -> ()) -> Eureka.Section", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
"(extension in Eureka):Eureka.RowType<A where A: Eureka.BaseRow, A: Eureka.RowType, A: Eureka.TypedRowType, A.Value == A.Cell.Value>.onChange ((A) -> ()) -> A", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
"(extension in Eureka):Eureka.RowType<A where A: Eureka.BaseRow, A: Eureka.RowType, A: Eureka.TypedRowType, A.Value == A.Cell.Value>.init (Swift.String?, (A) -> ()) -> A", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
"Eureka.Section.(init (Swift.String, (Eureka.Section) -> ()) -> Eureka.Section).(default argument 1)", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
"(extension in Eureka):Eureka.RowType<A where A: Eureka.BaseRow, A: Eureka.RowType, A: Eureka.TypedRowType, A.Value == A.Cell.Value>.(init (Swift.String?, (A) -> ()) -> A).(default argument 0)", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
"type metadata for Eureka.FormViewController", referenced from:
  _OBJC_CLASS_$__TtC10ParentNews16FilterController in FilterController.o
"type metadata accessor for Eureka.Form", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
  type metadata accessor for Swift.IndexingGenerator<Eureka.Form> in FilterController.o
  type metadata accessor for Swift.MutableSlice<Eureka.Form> in FilterController.o
"type metadata accessor for Eureka.Section", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
  type metadata accessor for Swift.IndexingGenerator<Eureka.Form> in FilterController.o
  type metadata accessor for Swift.MutableSlice<Eureka.Form> in FilterController.o
  type metadata accessor for Swift.IndexingGenerator<Swift.MutableSlice<Eureka.Form>> in FilterController.o
"type metadata accessor for Eureka.CheckRow", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
  lazy protocol witness table accessor for type Eureka.CheckRow and conformance <A, B where B: Eureka.BaseCell, B: Eureka.CellType, B: Eureka.TypedCellType, A == B.Value> Eureka.Row<A, B> : Eureka.TypedRowType in Eureka in FilterController.o
"type metadata accessor for Eureka.CheckCell", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
  lazy protocol witness table accessor for type Eureka.CheckCell and conformance <A where A: Swift.Equatable> Eureka.Cell<A> : Eureka.TypedCellType in Eureka in FilterController.o
"protocol witness table for Eureka.Form : Swift.CollectionType in Eureka", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
"protocol witness table for Eureka.Form : Swift.MutableIndexable in Eureka", referenced from:
  type metadata accessor for Swift.MutableSlice<Eureka.Form> in FilterController.o
"protocol witness table for Eureka.Form : Swift.Indexable in Eureka", referenced from:
  type metadata accessor for Swift.IndexingGenerator<Eureka.Form> in FilterController.o
"protocol witness table for Eureka.CheckRow : Eureka.RowType in Eureka", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
"protocol witness table accessor for <A, B where B: Eureka.BaseCell, B: Eureka.CellType, B: Eureka.TypedCellType, A == B.Value> Eureka.Row<A, B> : Eureka.TypedRowType in Eureka", referenced from:
  lazy protocol witness table accessor for type Eureka.CheckRow and conformance <A, B where B: Eureka.BaseCell, B: Eureka.CellType, B: Eureka.TypedCellType, A == B.Value> Eureka.Row<A, B> : Eureka.TypedRowType in Eureka in FilterController.o
"protocol witness table accessor for <A where A: Swift.Equatable> Eureka.Cell<A> : Eureka.TypedCellType in Eureka", referenced from:
  lazy protocol witness table accessor for type Eureka.CheckCell and conformance <A where A: Swift.Equatable> Eureka.Cell<A> : Eureka.TypedCellType in Eureka in FilterController.o
"static Eureka.<<< infix (Eureka.Section, Eureka.BaseRow) -> Eureka.Section", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
"static Eureka.+++ infix (Eureka.Form, Eureka.Section) -> Eureka.Form", referenced from:
  ParentNews.FilterController.viewDidLoad () -> () in FilterController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:0)

检查以下内容。

(1)项目中缺少任何框架或.a。 (当它在项目中第一次添加时,可能是它没有被复制到项目文件夹中,所以当你在其他地方存档和取消存档时,它没有从位置获取参考))

(2)框架搜索路径 - 添加到下面的行。

$(PROJECT_DIR)/ ProjectName / WhichEverIsYourFrameWork(路径高达.a文件)

(3)删除该框架,删除框架搜索路径,现在只需将其拖放到root中,框架搜索文件就会自动创建。

<强>加成

(4)当您更改安装cocoapods的位置时,您必须再次在新位置触发命令以再次安装命令。 清理并构建它。