问题
I am working on a project accessing web service. I found a project
http://d1xzuxjlafny7l.cloudfront.net/downloads/PromoTest.zip
The above code include JSON library [project setting compiler = LLVM 4.2]
And I tried to use partial code of that project in my project.
So I copied the JSON library into my project [my project uses Apple LLVM 3.1]
and then some error show up
eg.
SBJsonStreamWriterState **states;
//error:Pointer to non-const type "SBJsonStreamWriterState *" with no explicit ownership
I have tried using compiler flags -fno-objc-arc, no good. I wonder if its a ARC problem? if it is, then why above compiler flag wont work.
回答1:
Try disabling ARC at the target level like shown in the attached picture:
回答2:
So, I solved it by deleting SBJson Library. I found Apple already written a json library.
来源:https://stackoverflow.com/questions/11091059/ios-project-compilation