如何快速修复未定义的符号错误?

发布于 2025-01-19 11:53:05 字数 642 浏览 4 评论 0原文

最近,我开始在带有M1芯片的Mac上进行Swift项目。 该项目使用普通的Swift软件包管理器,但还具有Moscapsule( https://github.com/github.com/flightonary/moscapsule )手动安装。因此,它在所有其他依赖项和包装的应用程序之前都进行了编译。 如果您在iPad-simulator上编译并运行该应用程序,则需要告诉Moscapsule目标以编译X86_64架构,因为它使用X86_64 iPad Simulator。这绝对可以。

然后,我尝试编译并运行该应用程序的UI测试。现在,编译器未能构建应用程序,因为编译器需要为ARM64架构编译的Moscapsule框架。

我想:没问题,然后将其编译为ARM64架构。但是后来我得到了这些错误: “” 有趣的是,如果我编译了真实ARM64设备(带M1芯片的iPad Pro)的应用程序或UI测试,则根本没有问题。

你们中的一个人已经有类似的问题并为我有解决方案吗?

谢谢你!

Recently I got to work on a Swift project on a mac with a M1 chip.
This project uses the normal swift package manager but also has Moscapsule (https://github.com/flightonary/Moscapsule) manually installed. Therefore it gets compiled before all other dependencies and the app the package is used for.
If you compile and run the app on an iPad-Simulator you need to tell the Moscapsule target to compile for x86_64 architecture because it uses a x86_64 iPad simulator. This works absolutely fine.

Then I tried to compile and run the UI Tests for the app. Now the compiler failed to build the app because the compiler needs the Moscapsule framework compiled for arm64 architecture.

I thought: Ok no problem, then compile it for arm64 architecture. But then I get these errors:

The interesting thing to mention is that if I compile the app or the UI Tests for a real arm64 device (iPad Pro with M1 Chip) there is no problem at all.

Did one of you have a similar problem already and has a solution for me?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文