在 XCode 中使用旧的库和新的引用计数
最新版本的 XCode 支持引用计数。然而,许多旧的库与新的引用计数架构不兼容。
是否有编译器选项或其他选项可以将非引用计数库与新的引用计数应用程序一起使用,或者我总是需要更新代码?
使用 C 的库(显然没有引用计数)会发生什么?
The latest version of XCode supports reference counting. However many older libraries are not compatible with the new Reference Counting architecture.
Is there a Compiler option or something to use non Reference Counted libraries with a new reference counted app, or do I always have to update the code?
What happens with libraries that use C (obviously not reference counted)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以这样做。在要更改的目标的
构建阶段
选项卡中,您可以在编译源
部分下为项目中的每个文件设置编译器标志。只需为您不想使用 ARC 的文件设置编译器标志即可:
您可以在选择文件时按住
Cmd
一次将标志添加到多个文件。You can do this. In the
build phases
tab for the target you want to change, you can set compiler flags for each file in your project under theCompile Sources
section.Simply set the compiler flags for the files you don't want to use
ARC
on to:You can hold
Cmd
while selecting files to add the flag to several files at once.