2013-04-25 110 views
1

我沿着關於使用來自TDD site的xcode/appcode構建測試的說明。我完成了最初的部分,並開始在自己的項目中進行實驗,但是我一直收到鏈接錯誤,無法找出從哪裏來的?Xcode中的測試鏈接器錯誤

我得到的輸出是這樣的

Ld /Users/prasanth/Library/Developer/Xcode/DerivedData/acidplus-ctbnayjfiyhfxkccqyopjsnfagos/Build/Products/Debug-iphonesimulator/acidplusTests.octest/acidplusTests normal i386 
cd /Volumes/Defiant/Freeradical/freeradical_newacidbase/acidplus 
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1 
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 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/prasanth/Library/Developer/Xcode/DerivedData/acidplus-ctbnayjfiyhfxkccqyopjsnfagos/Build/Products/Debug-iphonesimulator -LLibs/OCMock/iOS -LLibs/OCMock/iOS/OCMock -F/Users/prasanth/Library/Developer/Xcode/DerivedData/acidplus-ctbnayjfiyhfxkccqyopjsnfagos/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/prasanth/Library/Developer/Xcode/DerivedData/acidplus-ctbnayjfiyhfxkccqyopjsnfagos/Build/Intermediates/acidplus.build/Debug-iphonesimulator/acidplusTests.build/Objects-normal/i386/acidplusTests.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -force_load Libs/OCMock/iOS/libOCMock.a -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework CoreGraphics -framework SenTestingKit -framework UIKit -framework Foundation -lOCMock -o /Users/prasanth/Library/Developer/Xcode/DerivedData/acidplus-ctbnayjfiyhfxkccqyopjsnfagos/Build/Products/Debug-iphonesimulator/acidplusTests.octest/acidplusTests 

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

我試圖尋找丟失的來源或鏈接庫,但找不到任何東西。任何人都知道還有什麼可能是錯的?

謝謝!

回答

0

你有沒有試過如下:

去的XCode,在項目 - >做一個乾淨的和重新生成您的解決方案。

+0

我試過這個沒有改變的錯誤 – Prasanth 2013-04-25 18:12:17