GHUnit 错误文件 _OBJC_CLASS_$_SenTestCase",引用



我在我的项目中使用 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/Content/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Content/Developer/usr/bin:/usr/bin:/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Content/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot/Applications/Xcode.app/Content/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/Content/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

架构 i386 的未定义符号: "_OBJC_CLASS_$_SenTestCase",参考自: _OBJC_CLASS_$_LogicTests in LogicTests.o "_OBJC_METACLASS_$_SenTestCase",引用自: _OBJC_METACLASS_$_LogicTests in LogicTests.o LD:找不到架构 i386 的符号 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用(

查看此链接: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 的确切顺序添加项目。

相关内容

  • 没有找到相关文章

最新更新