gpt4 book ai didi

ios - 在 proj 中使用 lib 文件时崩溃

转载 作者:行者123 更新时间:2023-12-01 19:02:13 25 4
gpt4 key购买 nike

我已按照本教程 LINK

但是当我将 lib 及其 .h 添加到项目时出现链接器错误。

我搜索了谷歌,我发现应该在设置中添加-ObjC和-all_load 我做了但错误无法解决。错误如下:

ld: warning: ignoring file /Users/techvedika/Desktop/RND/MathTest/MathTest/iCodeBlogsMathLibrary/libICodeMathUtils.a, missing required architecture i386 in file /Users/techvedika/Desktop/RND/MathTest/MathTest/iCodeBlogsMathLibrary/libICodeMathUtils.a (3 slices) Undefined symbols for architecture i386: "_OBJC_CLASS_$_MathFunctions", 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)



我该如何解决这个问题?

最佳答案

你能检查一下lipo -info libICodeMathUtils.a在终端上。如果它没有列出架构 i386,则意味着您的库不是为模拟器构建的。它不适用于模拟器

关于ios - 在 proj 中使用 lib 文件时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22091680/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com