Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode 4.3 - Build error "missing required architecture armv7"

Tags:

xcode4

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)
like image 834
Tommy Avatar asked Mar 08 '12 07:03

Tommy


1 Answers

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.

What fixed it for me was:-

  1. Select Project in project navigator
  2. Select Test Target
  3. Select Build Settings
  4. Go down to Framework Search Paths and single-click it
  5. Delete whatever is there
  6. Enter $(SDKROOT)/Developer/Library/Frameworks $(DEVELOPER_LIBRARY_DIR)/Frameworks
  7. If you had any custom frameworks, add those back

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

like image 138
Phil Penn Avatar answered Sep 27 '22 22:09

Phil Penn