XCode 4.3 - 构建错误“缺少所需的架构 armv7"; [英] XCode 4.3 - Build error "missing required architecture armv7"

查看:41
本文介绍了XCode 4.3 - 构建错误“缺少所需的架构 armv7";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将 XCode 从 4.2 升级到 4.3 后,我遇到了以下问题.我不能建造它.你们知道我该如何解决这个问题吗?即使是一些线索也会对我有所帮助.

After upgrade XCode from 4.2 to 4.3 I've got below problem. I can't build it. Do you guys have idea how can I resolve this problem? even some clue would be helpful to me.

ld: warning: ignoring file    /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit, missing required architecture armv7 in file
Undefined symbols for architecture armv7:
  "_STComposeString", referenced from:
      -[NSMutableURLRequest_ParametersTest verifyDefaultParametersForRequest:] in NSMutableURLRequest+ParametersTest.o
      -[NSMutableURLRequest_ParametersTest verifyModifiedParametersForRequest:] in NSMutableURLRequest+ParametersTest.o
      -[NSMutableURLRequest_ParametersTest verifyEmptyParametersForRequest:] in NSMutableURLRequest+ParametersTest.o
      -[NSString_URLEncodingTest testURLEncodedString] in NSString+URLEncodingTest.o
      -[NSURL_BaseTest testURLStringWithoutQuery] in NSURL+BaseTest.o
      -[OAHMAC_SHA1SignatureProviderTest testSignClearText] in OAHMAC_SHA1SignatureProviderTest.o
      -[OAMutableURLRequestTest testGenerateNonce] in OAMutableURLRequestTest.o
      ...
  "_OBJC_CLASS_$_SenTestCase", referenced from:
      _OBJC_CLASS_$_NSMutableURLRequest_ParametersTest in NSMutableURLRequest+ParametersTest.o
      _OBJC_CLASS_$_NSString_URLEncodingTest in NSString+URLEncodingTest.o
      _OBJC_CLASS_$_NSURL_BaseTest in NSURL+BaseTest.o
      _OBJC_CLASS_$_OAHMAC_SHA1SignatureProviderTest in OAHMAC_SHA1SignatureProviderTest.o
      _OBJC_CLASS_$_OAMutableURLRequestTest in OAMutableURLRequestTest.o
      _OBJC_CLASS_$_OAPlaintextSignatureProviderTest in OAPlaintextSignatureProviderTest.o
      _OBJC_CLASS_$_OARequestParameterTest in OARequestParameterTest.o
      ...
  "_OBJC_METACLASS_$_SenTestCase", referenced from:
      _OBJC_METACLASS_$_NSMutableURLRequest_ParametersTest in NSMutableURLRequest+ParametersTest.o
      _OBJC_METACLASS_$_NSString_URLEncodingTest in NSString+URLEncodingTest.o
      _OBJC_METACLASS_$_NSURL_BaseTest in NSURL+BaseTest.o
      _OBJC_METACLASS_$_OAHMAC_SHA1SignatureProviderTest in OAHMAC_SHA1SignatureProviderTest.o
      _OBJC_METACLASS_$_OAMutableURLRequestTest in OAMutableURLRequestTest.o
      _OBJC_METACLASS_$_OAPlaintextSignatureProviderTest in OAPlaintextSignatureProviderTest.o
      _OBJC_METACLASS_$_OARequestParameterTest in OARequestParameterTest.o
      ...
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

推荐答案

从 Xcode 4.2 -> 4.3.1 升级后,我遇到了相同的模拟器链接错误.我注意到 4.3.1 中的新项目确实可以使用单元测试,所以只是比较了项目差异.

I was getting the same linking error for the Simulator after upgrading from Xcode 4.2 -> 4.3.1. I noticed that new projects in 4.3.1 do work with Unit Tests, so just compared the project differences.

为我修复的是:-

  1. 在项目导航器中选择项目
  2. 选择测试目标
  3. 选择构建设置
  4. 转到框架搜索路径"并单击它
  5. 删除任何存在的内容
  6. 输入 $(SDKROOT)/Developer/Library/Frameworks $(DEVELOPER_LIBRARY_DIR)/Frameworks
  7. 如果您有任何自定义框架,请将其添加回来

实际上,单元测试在设备上也运行良好.

Actually, Unit Tests run fine on the Device, too.

这篇关于XCode 4.3 - 构建错误“缺少所需的架构 armv7";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆