我试图将我的应用程序加载到我的iPhone 5.0,我得到15个错误,所有这些都与架构armv7缺少文件和未定义的符号有关。我有xcode 4.2.1,错误看起来像这样:
> ld: warning: ignoring file
> /Users/kylebeard/Xcode/Construction/Foundation.framework/Foundation,
> missing required architecture armv7 in file Undefined symbols for
> architecture armv7: "_objc_msgSendSuper2", referenced from:
> -[ViewController didReceiveMemoryWarning] in ViewController.o
> -[ViewController viewDidLoad] in ViewController.o
> -[ViewController viewDidUnload] in ViewController.o
> -[ViewController viewWillAppear:] in ViewController.o
> -[ViewController viewDidAppear:] in ViewController.o
> -[ViewController viewWillDisappear:] in ViewController.o
> -[ViewController viewDidDisappear:] in ViewController.o
> ... "_objc_setProperty", referenced from:
> -[AppDelegate setWindow:] in AppDelegate.o
> -[AppDelegate setViewController:] in AppDelegate.o "__objc_empty_vtable", referenced from:
> _OBJC_METACLASS_$_AppDelegate in AppDelegate.o
> _OBJC_CLASS_$_AppDelegate in AppDelegate.o
> _OBJC_CLASS_$_ViewController in ViewController.o
> _OBJC_METACLASS_$_ViewController in ViewController.o "_objc_msgSend", referenced from:
> _main in main.o
> "_objc_msgSend_stret", referenced from:
> "_objc_autoreleasePoolPop", referenced from:
> _main in main.o "__objc_empty_cache", referenced from:
> _OBJC_METACLASS_$_AppDelegate in AppDelegate.o
> _OBJC_CLASS_$_AppDelegate in AppDelegate.o
> _OBJC_CLASS_$_ViewController in ViewController.o
> _OBJC_METACLASS_$_ViewController in ViewController.o "_objc_storeStrong", referenced from:
> -[AppDelegate .cxx_destruct] in AppDelegate.o
> -[ViewController .cxx_destruct] in ViewController.o "_objc_retain", referenced from:
>
> "___CFConstantStringClassReference", referenced from:
> "_objc_autoreleasePoolPush", referenced from:
> _main in main.o "_NSStringFromClass", referenced from:
> _main in main.o "_objc_release", referenced from:
> _main in main.o "_objc_retainAutoreleasedReturnValue", referenced from:
>
> _OBJC_METACLASS_$_AppDelegate in AppDelegate.o
> _OBJC_METACLASS_$_ViewController in ViewController.o ld: symbol(s) not found for architecture armv7 clang: error: linker
> command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:1)
正如您所说,错误是missing architecture armv7
,因此请确保将armv7
添加到Xcode中的构建设置的“架构”部分,然后尝试重新编译。另外,请检查它是否未被覆盖到任何目标中的i386
。