can't compiler json-framework - iphone

I'm using json-framework to parse json, but when I compile I get the following errors:
xxx/SBJsonStreamParser.h
xxx/SBJsonStreamParser.h:105: error: expected a property attribute before 'unsafe_unretained'
xxx.h:106: error: expected a property attribute before 'strong'
etc....
Developer Information:
Version: 4.2 (4D199)
Location: /Developer
Applications:
Xcode: 4.2 (828)
Instruments: 4.2 (4233)
Dashcode: 3.0.2 (336)
SDKs:
Mac OS X:
10.6: (10K549)
10.7: (11C63)
iPhone OS:
5.0: (9A334)
iPhone Simulator:
4.3: (8H7)
5.0: (9A334)

Check in your Build Settings/Build Options the compiler: Use the default Apple LLVM compiler 3.0 instead of LLVM GCC 4.2.

Use JSONKit instead, it's faster, has less memory leaks, and it might be easier to switch than debugging this issue.
https://github.com/johnezang/JSONKit

Related

Unsupported compiler 'GCC 4.2' selected for architecture 'armv7' in xcode 4.6

I accidentally updated my iphone to 6.1 and when that happened I came to know that I have to update the xcode version too to Version 4.6 (4H127), which I did. I had a requirement to read qrcode for which I was using Zxing and it was working perfectly well. After all updates, its throwing an error with build failed. The error says
"Unsupported compiler 'GCC 4.2' selected for architecture 'armv7'"
I tried searching for the answer changed the compiler from Default to LLVM GCC 4.2 from default that is APPLE LLVM Compiler 4.2 but with no change.
Please guide me to resolve the issue.

Build Error : expected a property attribute before 'unsafe_unretained'

I'm building iSpeechSDK Beta 3 (released on 2012-05-18) for my sample/test project (iOS Universal app) I just created. I'm getting build time errors.
.....iSpeechSDK/Headers/ISSpeechSynthesis.h:58: error: expected a property attribute before 'unsafe_unretained'
When I double click on the error, it points to the SDK header class: ISSpeechSynthesis.h
..
#property (nonatomic, unsafe_unretained) id delegate;
..
PS: I have added the documented linker flag in other linker flags of Build: -fobjc-arc
I tried building for simulator/device/debug/release but all build targets produce same above error.
Please help me resolve this build error.
System/Development configuration-
Mac OS: 10.6.8
XCode: 3.2.5
iOS SDK: 4.2
You are using wrong complier. LLVM GCC does not supports Strong and other ARC keywords. Please set your complier as LLVM compiler 4.2
I don't believe ARC is supported in Xcode 3.2.5. I believe it was introduced in Xcode 4.2, but you can try changing your Compiler setting to LLVM GCC 4.2 in 'Build Settings'

How to use Cocos 2D 1.1.0, When I run a sample Cocos2D Appication it gives error

How to use Cocos2D 1.1.0, When I am choose a template as Cocos2D Application and name it "NewCocos", When simply run this project without doing anything It gives me
124 errors
of same type = error: missing binary operator before token "("
this errors shows near "#if defined(__has_feature) && __has_feature(objc_arc)"
18 Warnings
of same type = warning: ignoring #pragma clang diagnostic
this warning shows near "#pragma clang diagnostic push" , "#pragma clang diagnostic pop" etc...
I am using XCode 3.2.4 and iOS / iPhone OS 4.1
In short statement gives (124 times) error of
error: missing binary operator before token "("
on the statement without quotes "#if defined(__has_feature) && __has_feature(objc_arc)"
This is working fine in Cocos v1.0.1 older version but not working on cocos v1.1.0
Cocos2D v1.1 requires to set the compiler to "Apple LLVM compiler" in Build Settings. Only Xcode 4.0 and newer are shipped with the Apple LLVM compiler. Furthermore, to enable ARC you must be using at least Xcode 4.2 with the "Apple LLVM compiler 3.0".
You should seriously consider upgrading. Xcode 3.2 is over 2 years old now (released: August 2009). As mentioned here, only apps built with the latest, or if not "too old" the second to latest iOS SDK version are going to be approved by Apple (at the time of this writing iOS 5.0 is the latest SDK but iOS 4.3 apps are also still accepted). Regardless of that, Xcode 4 makes it a lot easier to submit apps through its built-in Organizer.
this is XCode 3.2.4 problem Update Your X-Code Minimum X-Code 4.2.0

Xcode 3.2.2 and LLVM version 1.0.2 failing

I have Xcode 3.2.2 and I am trying to use LLVM version 1.0.2 as a compiler.
When I do that, I see the error
Library not found for -lgcc
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang
failed with exit code 1
How do I solve that?
thanks.
You can't use LLVM to compile iPhone apps in 3.2. You'll need to use GCC.
In fact it seems that you can use LLVM on Xcode 3.2.3. I've just downloaded it now and LLVM works!!!!

UIKit SDK 3.0 error

I am using iphone_sdk_3.0_beta_5__9m2735 SDK.
When I try to compile my code using simulator 3.0 option I get following error. The code compiles for rest all simulator option ie 2.0, 2.1, 2.2, 2.2.1
While compiling my code I get following error
from /Users/videomac/manish/EXPLab/2009-05-27-11-20 myApp_LL_2/myApp_Prefix.pch:7:
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:30,
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:11: error: syntax error before 'AT_NAME' token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:19: error: syntax error before '}' token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:21: fatal error: method definition not in #implementation context
The errors are located in file UILocalizedIndexedCollation.h which is SDK file.I am using UIKit Framework of SDK 3.0. Can anyone tell me what should I do to remove this error?
I've traced this problem to be the compiler version being used. From what I can tell, [REDACTED] requires GCC 4.2 while iPhone SDK 2.x only works with GCC 4.0.
Here's a way to fix this.
In your Target Info, select Build separator and look for the section Compiler Version. Then:
Select the C/C++ Compiler Version row
Set the default to GCC 4.0
At the bottom-left control, hit Add Build Setting Condition
On the left, choose Device - iPhone OS 3.0
On the right, chose GCC 4.2
Repeat steps 3 to 5, now with Simulator - iPhone OS 3.0 on step 4.
Apple’s engineer had confirmed that they had a bug in UIKit framework:
We do have a simple workaround for this UIKit bug. In UILocalizedIndexedCollation.h change this:
UIKIT_EXTERN #interface UILocalizedIndexedCollation : NSObject
to
UIKIT_EXTERN_CLASS #interface UILocalizedIndexedCollation : NSObject
Denis2342
Firstly you should discuss beta products here.
However, this is not connected with the beta. You have an error in one of your own header filesprobably a missing '#end' statment.
BTW, google could have solved this for you rather than asking here.