xcode 3.x build errors with cocos2d-x-0.9.0

Hi,

I created a cocos2d-x-box2d project and try to build just the auto generated template code and I got some 100+ errors, so I change the GCC version from 4.2 to 4.0 and I got 46 errors
here is the Error log
@
Line Location CCEGLView_ios.mm:58: warning: ‘UIScreen’ may not respond to ‘scale’
Line Location CCEGLView_ios.mm:58:
Line Location CCEGLView_ios.mm:58: error: invalid operands of types ’objc_object**’ and ’double’ to binary ’operator!=’
Line Location CCEGLView_ios.mm:64: error: request for member ’contentScaleFactor’ in ’view’, which is of non-class type ’UIView**’
Line Location CCImage_ios.mm:395: error: request for member ’lineHeight’ in ’font’, which is of non-class type ’UIFont*’
Line Location CocosDenshion.m:575: warning: control reaches end of non-void function
Line Location EAGLView.h:80: error: cannot find protocol declaration for ’UIKeyInput’
Line Location EAGLView.h:80: error: cannot find protocol declaration for ’UITextInput’
Line Location EAGLView.h:80: error: cannot find protocol declaration for ’UIKeyInput’
Line Location EAGLView.h:80: error: cannot find protocol declaration for ’UITextInput’
Line Location EAGLView.h:80: error: cannot find protocol declaration for ’UIKeyInput’
Line Location EAGLView.h:80: error: cannot find protocol declaration for ’UITextInput’
Line Location EAGLView.h:102: error: ’UITextPosition’ has not been declared
Line Location EAGLView.h:102: error: ’UITextPosition’ has not been declared
Line Location EAGLView.h:102: error: ’UITextPosition’ has not been declared
Line Location EAGLView.h:103: error: ’UITextPosition’ has not been declared
Line Location EAGLView.h:103: error: ’UITextPosition’ has not been declared
Line Location EAGLView.h:103: error: ’UITextPosition’ has not been declared
Line Location EAGLView.h:104: error: cannot find protocol declaration for ’UITextInputDelegate’
Line Location EAGLView.h:104: error: cannot find protocol declaration for ’UITextInputDelegate’
Line Location EAGLView.h:104: error: cannot find protocol declaration for ’UITextInputDelegate’
Line Location EAGLView.h:105: error: ’UITextRange’ has not been declared
Line Location EAGLView.h:105: error: ’UITextRange’ has not been declared
Line Location EAGLView.h:105: error: ’UITextRange’ has not been declared
Line Location EAGLView.h:107: error: ’UITextRange’ has not been declared
Line Location EAGLView.h:107: error: ’UITextRange’ has not been declared
Line Location EAGLView.h:107: error: ’UITextRange’ has not been declared
Line Location EAGLView.h:108: error: cannot find protocol declaration for ’UITextInputTokenizer’
Line Location EAGLView.h:108: error: cannot find protocol declaration for ’UITextInputTokenizer’
Line Location EAGLView.h:108: error: cannot find protocol declaration for ’UITextInputTokenizer’
Line Location EAGLView.h:156: warning: previous declaration of ’
(void)setSelectedTextRange:(int )value’
Line Location EAGLView.h:156: error: property ’selectedTextRange’ with ’copy’ attribute must be of object type
Line Location EAGLView.h:156: error: property ’selectedTextRange’ with ’copy’ attribute must be of object type
Line Location EAGLView.h:156: error: property ’selectedTextRange’ with ’copy’ attribute must be of object type
Line Location EAGLView.mm:141: error: ’multiSampling
’ was not declared in this scope
Line Location EAGLView.mm:166: error: ’multiSampling
’ was not declared in this scope
Line Location EAGLView.mm:253: error: ’multiSampling
’ was not declared in this scope
Line Location EAGLView.mm:348: error: ’multiSampling_’ was not declared in this scope
Line Location EAGLView.mm:576: error: expected `{’ before ’**’ token
Line Location EAGLView.mm:576: warning: conflicting types for ‘-(void)setSelectedTextRange:()UITextRange’
Line Location EAGLView.mm:576: error: expected type-specifier before ‘UITextRange’
Line Location EAGLView.mm:576: error: expected unqualified-id before ‘)’ token
Line Location EAGLView.mm:576: error: expected `)‘before ’UITextRange’
Line Location EAGLView.mm:576: error: expected constructor, destructor, or type conversion before ‘)’ token
Line Location EAGLView.mm:577: error: stray ‘{’ between Objective-C*+ methods
Line Location EAGLView.mm:579: error: stray ‘}’ between Objective-C*+ methods
Line Location EAGLView.mm:580: confused by earlier errors, bailing out
Line Location EAGLView.mm:580: error: expected type-specifier before ‘UITextRange’
Line Location EAGLView.mm:580: error: expected `)‘before ’UITextRange’
Line Location EAGLView.mm:580: error: return type ‘’ is incomplete
Line Location ES1Renderer.m:54: error: ‘GL_MAX_SAMPLES_APPLE’ undeclared (first use in this function)
Line Location ES1Renderer.m:100: warning: implicit declaration of function ‘glRenderbufferStorageMultisampleAPPLE’
@

Could anyone advice or instruct me what I am doing wrong here.

Thanks
Ramki.

I have no xcode3 now, it’s in my office. This problem will be test again tomorrow. It looks like caused by an older iOS sdk.

But can you tell me this info:
* version of your ios sdk
* exact version of your xcode3
* version of OS X
* type of mac machine

It will be helpful to reproduce this problem, thanks in advance!

Hi Walzer thanks for your reply.

I have ios version 3.0, xcode 3.1.3 on windows Acer laptop with mac OS 10.3. I never used mac before. This is the first time I am working in mac environment.

I am getting a new Mac mini this september, so just trying my hands in mac environment, My objective is to translate some of the ray’s cocos-iphone tutorials from “http://www.raywenderlich.com/” to cocos2d-x.

Thanks
Ramki.

Oh, “black apple” isn’t supported by cocos2d-x. It usually cause unknown compilation errors & running errors.
And iOS SDK v4.0 or higher is required.