[英]Siphon builds for iOS simulator but getting linker error for device build
[英]Static iOS Library builds for device but not Simulator
盡管該庫位於“與二進制庫鏈接”區域中,並且還包含頭文件,但仍出現此錯誤。
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TestLibraryEric", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
當我為模擬器而不是為設備構建時,出現此錯誤。 我以相反的方式看到了這個問題,它是為模擬器而不是為設備構建的。 僅針對活動體系結構的構建設置為“無”嗎?
該錯誤意味着TestLibraryEric
僅針對設備(針對ARM體系結構進行編譯)而構建,而不針對模擬器(i386體系結構)進行構建。
如果該庫是您創建的庫,則需要更改構建設置。
在“ Supported Platforms
字段中,您應該擁有iphoneos
。
添加iphonesimulator
,您的資料庫將同時針對設備和模擬器構建。
做一個干凈的,重建庫,它應該可以解決問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.