在arc项目里引用非arc项目,在引用的.m文件里加了-fno-objc-arc,然后运行会出如下错误:Pointer to non-const type 'PLTexture*'with no explicit ownership,具体如图:
原因是:这里声明的是双指针,加在这里好像识别有问题,然后解决办法就是把上面出错的两句换成下面:
PLTexture *__unsafe_unretained*previewTextures;
PLTexture *__unsafe_unretained *textures;
这样就运行成功了。
本文解决了在ARC项目中引用非ARC项目时出现的Pointertonon-consttype'PLTexture*'withnoexplicitownership错误。通过修改指针类型为__unsafe_unretained,成功解决了该问题。

332

被折叠的 条评论
为什么被折叠?



