c++ - 体系结构 x86_64 : CMMotionManager with SFML 的 undefined symbol

标签 c++ ios objective-c sfml

我一直在尝试为 iOS 构建我的 SFML 应用程序,但我一直遇到障碍。最新的是一个我不明白的错误,我在 Mac 上工作不多,因此不知道大多数错误的含义。这个特定的错误似乎与 SFML 本身有关。我能做些什么吗?以下是错误。

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_CMMotionManager", referenced from:
   objc-class-ref in libsfml-window-s.a(SFAppDelegate.o)
ld: symbol(s) not found for architecture x86_64

我在 SFML 源代码中找到了 CMMotionManager,但我不确定如何解决这个问题。

@property (nonatomic) CMMotionManager* motionManager;

非常感谢任何帮助,如果您还需要解决此问题,请告诉我,同样,我不知道 XCode 产生的大部分错误是什么意思,所以我不知道该怎么做提供。

更新: SFML 论坛上有人说我可能只是忘记链接到 CoreMotion 框架,我会在回到我的计算机后立即尝试,并希望用解决方案再次更新这篇文章。

最佳答案

您的 libsfml-window-s.a 不是为您的模拟器构建的。您需要一个为模拟器(架构 x86_64)构建的二进制文件。也许您还应该为 arm64 和 armv7 构建另一个

关于c++ - 体系结构 x86_64 : CMMotionManager with SFML 的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30656877/

相关文章:

ios - 如何摆脱 iOS 14 中的 MKBalloonCalloutView

ios - UIviewcontroller - View 属性什么时候实例化?

ios - 错误消息 "Parse Issue Expected identified or ‘(‘ "

objective-c - 使用 Objection 时,自定义协议(protocol)的实现因无法识别的选择器而崩溃

c++ - 在 Ubuntu 13 的 64 位环境中构建 32 位 FCGI++ 二进制文件

c++ - Arduino 库包括 Sketch 目录中的文件

c++ - 如何将 Graphics.h 包含在 Codelite 中?

c++ - 按对象属性搜索对象 vector

ios - 无法流式传输 .m3U8 文件

ios - 使用 ffmpeg 和 AVAudioPlayer 播放音频