0
我想在iOS项目中包含一个静态库。 我进口某文件和每一个的.h相关但后来我得到这个错误:当我的静态库包含在一个iOS项目中时出错
ld: warning: ignoring file /Users/alexis/Library/Developer/Xcode/DerivedData/PlazappPartnerWorkspace- cdrmloavlcqouugawmtqywiinqne/Build/Products/Debug-iphoneos/libPlazappPartnerLib.a, file was built for archive which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_LauncherViewController", 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)
我想有建筑类型的问题,但我不明白为什么也不知道如何解决它。 有人可以解释给我,并告诉我如何解决它?谢谢!
我已经检查过每个设置,并尝试使用位于iphoneos和iphonesimulator中的两个.a文件,但这并没有改变任何内容。 – Alexis
查看错误消息中提到的库的体系结构(请参阅我的更新回答)。另外,请检查搜索库路径。如果您有多个副本,如果设置了错误的路径,Xcode可能会选择错误的副本。 – djromero
我用lipo像你说过的那样检查过架构。我之前可能犯了一个错误,现在起作用了。谢谢你的帮助! – Alexis