2012-05-18 25 views
3

我使用GHUnit在我的項目,但是當我嘗試運行它給錯誤

Ld /Users/goldfire/Library/Developer/Xcode/DerivedData/WhatsMySpeed-amkgqintxyhelabqvrpouivmdglf/Build/Products/Debug-iphonesimulator/GHUnitTests.app/GHUnitTests normal i386 cd /Users/goldfire/Desktop/Example/WhatsMySpeed setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/goldfire/Library/Developer/Xcode/DerivedData/WhatsMySpeed-amkgqintxyhelabqvrpouivmdglf/Build/Products/Debug-iphonesimulator -F/Users/goldfire/Library/Developer/Xcode/DerivedData/WhatsMySpeed-amkgqintxyhelabqvrpouivmdglf/Build/Products/Debug-iphonesimulator -F/Users/goldfire/Desktop/Example/WhatsMySpeed -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/goldfire/Library/Developer/Xcode/DerivedData/WhatsMySpeed-amkgqintxyhelabqvrpouivmdglf/Build/Intermediates/WhatsMySpeed.build/Debug-iphonesimulator/GHUnitTests.build/Objects-normal/i386/GHUnitTests.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -all_load -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework UIKit -framework Foundation -framework CoreGraphics -framework GHUnitIOS -framework SenTestingKit -o /Users/goldfire/Library/Developer/Xcode/DerivedData/WhatsMySpeed-amkgqintxyhelabqvrpouivmdglf/Build/Products/Debug-iphonesimulator/GHUnitTests.app/GHUnitTests

Undefined symbols for architecture i386: "_OBJC_CLASS_$_SenTestCase", referenced from: _OBJC_CLASS_$_LogicTests in LogicTests.o "_OBJC_METACLASS_$_SenTestCase", referenced from: _OBJC_METACLASS_$_LogicTests in LogicTests.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

+0

請參閱此鏈接哪個有你的答案。 http://stackoverflow.com/questions/9614313/xcode-4-3-build-error-missing-required-architecture-armv7 – iMash

回答

7

看看這個鏈接的應用程序: http://fstanley.github.com/blog/2012/06/10/fixing-ghunit-sentestcase-link-errors/

基本上您需要添加:

$(SDKROOT)/Developer/Library/Frameworks

$(DEVELOPER_LIBRARY_DIR)/Frameworks

添加到測試目標設置中的框架搜索路徑。

我有同樣的錯誤,並修復它。

注意:必須按照http://forum.sparrow-framework.org/topic/cant-run-unit-tests的確切順序添加項目。

+0

這是正確的答案 –

+0

鏈接已死,答案不起作用: (。 – Adam

相關問題