在 ARC 应用程序中包含非 ARC 库?
那么,有可能吗?
我多次收到此错误:
ARC forbids Objective-C objects in structs or unions
例如这里:
typedef struct {
BOOL _field1;
union {
struct {
id _field1;
id _field2;
} _field1;
GSEventRef _field2;
} _field2;
} XXStruct_CKAdxD;
So, is it possible?
I get this error multiple times:
ARC forbids Objective-C objects in structs or unions
For example here:
typedef struct {
BOOL _field1;
union {
struct {
id _field1;
id _field2;
} _field1;
GSEventRef _field2;
} _field2;
} XXStruct_CKAdxD;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将
-fno-objc-arc
添加到每个不/不能使用 ARC 的文件的编译器选项中。在 Xcode 中,您可以从目标的“编译源”构建阶段执行此操作。双击该文件,然后在弹出的框中添加-fno-objc-arc
。You need to add
-fno-objc-arc
to the compiler options for each file that doesn't / can't use ARC. Within Xcode you do this from the 'Compile Sources' build phase of your target. Double click the file and add-fno-objc-arc
to the box that pops up.