iOS项目编译

时间:2012-06-18 21:07:51

标签: ios xcode compiler-construction automatic-ref-counting llvm

我正在开发一个访问Web服务的项目。我找到了一个项目

http://d1xzuxjlafny7l.cloudfront.net/downloads/PromoTest.zip

上面的代码包括JSON库[项目设置编译器= LLVM 4.2] 我试图在我的项目中使用该项目的部分代码。 所以我将JSON库复制到我的项目中[我的项目使用Apple LLVM 3.1] 然后出现一些错误 例如。

SBJsonStreamWriterState **states;

//error:Pointer to non-const type "SBJsonStreamWriterState *" with no explicit ownership

我尝试过使用编译器标志-fno-objc-arc,没有用。 我想知道它是否有ARC问题?如果是,那么为什么上面的编译器标志不会起作用。

2 个答案:

答案 0 :(得分:0)

尝试在目标级别禁用ARC,如附图所示:

enter image description here

答案 1 :(得分:0)

所以,我通过删除SBJson Library解决了这个问题。我发现Apple已经写了一个json库。

相关问题