2
我有一個使用我寫了一些Objective-C代碼迅捷的測試:斯威夫特測試鏈接錯誤
class ParserServiceTest: QuickSpec {
override func spec() {
var x : MyClass? // this works
x = MyClass() // this does not
}
}
當我嘗試建立的項目中,我得到的錯誤信息:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MyClass", referenced from:
__TTSf4d___TTSf4g___TFC11MyProjectTests17ParserServiceTest4specfS0_FT_T_ in ParserServiceTest.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
如果有人努力尋找這個設置:你可以在'Build Phases'下找到它,*在* Build Settings下找不到*。 – Bastian
編輯包括。謝謝。 –
如果我使用'swift package init'啓動項目,我該怎麼做? – TrungDQ