简体   繁体   English

在ARC应用程序中包含非ARC库?

[英]Include non-ARC library in an ARC app?

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;

You need to add -fno-objc-arc to the compiler options for each file that doesn't / can't use ARC. 您需要为每个不能/不能使用ARC的文件的编译器选项添加-fno-objc-arc Within Xcode you do this from the 'Compile Sources' build phase of your target. 在Xcode中,您可以从目标的“编译源”构建阶段执行此操作。 Double click the file and add -fno-objc-arc to the box that pops up. 双击该文件并将-fno-objc-arc添加到弹出的框中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM