我們實現了一個靜態庫並試圖在項目中使用它。該庫被編譯/構建好,但我們試圖分別進口.A & .h文件後運行該項目,我們有以下錯誤遇到:靜態庫和XCode 4.x
ld: warning: ignoring file Lib.a, file was built for archive which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MFourInOneStaticLib", referenced from:
objc-class-ref in MAppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已經檢查了architecture.More過度,我們使用模擬器進行測試。
您需要使用「lipo」工具構建通用庫。 –