我想構建我的第一個靜態庫,並且遇到了編譯問題。我的意思是我可以編譯我的圖書館和每一件事情看起來不錯,但是當我建立了一個測試項目來測試它,我得到了這樣那樣的錯誤:iOS:編譯靜態庫
ld: warning: ignoring file /Users/*/Desktop/TestApp/LibProva/libProva.a, file was built for archive which is not the architecture being linked (i386) Undefined symbols for architecture i386: "_OBJC_CLASS_$_Prova", 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)
ld: warning: ignoring file /Users/**/Desktop/TestApp/LibProva/libProva.a, file was built for archive which is not the architecture being linked (i386)
所以我想這就是有毛病編譯(因不同在模擬器和設備中的架構),但我無法找到如何以正確的方式做到這一點。有人能解釋我如何解決這個問題嗎?