Build errors XCode - Khronos OpenGL ES 2.0 SDK

Hi ,

I am trying to build and run the Training Courses included in the Khronos OpenGL ES 2.0 SDK for MacOS in Xcode 3.2.4, but I am getting errors I do not understand.

What I am doing is:

- Double klick the XCode Project File (e.g. OGLES2Initialization.xcode)
- Change the Base SDK to iOS Simulator 4.1 in Project Settings and Active Target
- Build and run.

Even in the simple example stated above i get 41 errors (see below). All the errors take place in the Apple frameworks, so I think there is a wrong setting somewhere, but I cannot find it.
All my other projects compile without problems.

Anyone can see what I am missing here ?

Thanks,

urbZZ


CompileC build/OGLES2Initialization.build/Debug-iphonesimulator/OGLES2Initialization.build/Objects-normal/i386/OGLES2Initialization_iPhone.o …/…/OGLES2Initialization_iPhone.mm normal i386 objective-c++ com.apple.compilers.gcc.4_2
cd /Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone
setenv LANG en_US.US-ASCII
setenv PATH “/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin”
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk -fexceptions -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/build/OGLES2Initialization.build/Debug-iphonesimulator/OGLES2Initialization.build/OGLES2Initialization-generated-files.hmap -I/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/build/OGLES2Initialization.build/Debug-iphonesimulator/OGLES2Initialization.build/OGLES2Initialization-own-target-headers.hmap -I/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/build/OGLES2Initialization.build/Debug-iphonesimulator/OGLES2Initialization.build/OGLES2Initialization-all-target-headers.hmap -iquote /Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/build/OGLES2Initialization.build/Debug-iphonesimulator/OGLES2Initialization.build/OGLES2Initialization-project-headers.hmap -Wall -F/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/build/Debug-iphonesimulator -iquote…/…/…/…/…/Builds/OGLES2/Include -iquote…/…/…/…/…/Tools/OGLES2 -I/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/build/Debug-iphonesimulator/include -I/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/build/OGLES2Initialization.build/Debug-iphonesimulator/OGLES2Initialization.build/DerivedSources/i386 -I/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/build/OGLES2Initialization.build/Debug-iphonesimulator/OGLES2Initialization.build/DerivedSources -include /var/folders/Bg/Bg-nRhujFNGrMFnPYaqCjk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Prefix-ccgqwyqzulllgnggdbkoaekbyoxn/Prefix.pch -DBUILD_OGLES2 -c /Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm -o /Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/build/OGLES2Initialization.build/Debug-iphonesimulator/OGLES2Initialization.build/Objects-normal/i386/OGLES2Initialization_iPhone.o

In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:26,
                 from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:17,
                 from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:9,
                 from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h:9,
                 from /Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:20:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:60: error: expected initializer before ‘__AVAILABILITY_INTERNAL__MAC_10_7’
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIActivityIndicatorView.h:8,
                 from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11,
                 from /Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:21:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: expected type-specifier before ‘UIViewAnimationOptions’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: expected )' before 'UIViewAnimationOptions'<br>/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: expected;’ before ‘)’ token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:256: error: expected type-specifier before ‘UIViewAnimationOptions’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:256: error: expected )' before 'UIViewAnimationOptions'<br>/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:256: error: expected;’ before ‘)’ token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:258: error: expected type-specifier before ‘UIViewAnimationOptions’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:258: error: expected )' before 'UIViewAnimationOptions'<br>/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:258: error: expected;’ before ‘)’ token
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:13,
                 from /Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:21:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:187: error: ‘UIApplicationState’ has not been declared
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:190: error: expected type-specifier before ‘UIBackgroundTaskIdentifier’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:190: error: expected )' before 'UIBackgroundTaskIdentifier'<br>/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:190: error: expected;’ before ‘)’ token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:191: error: expected type-specifier before ‘UIBackgroundTaskIdentifier’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:191: error: expected )' before 'UIBackgroundTaskIdentifier'<br>/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:191: error: expected;’ before ‘)’ token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:202: error: expected type-specifier before ‘UIRemoteNotificationType’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:202: error: expected )' before 'UIRemoteNotificationType'<br>/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:202: error: expected;’ before ‘)’ token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:206: error: expected type-specifier before ‘UIRemoteNotificationType’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:206: error: expected )' before 'UIRemoteNotificationType'<br>/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:206: error: expected;’ before ‘)’ token
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:73,
                 from /Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:21:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITextView.h:82: error: ‘UIDataDetectorTypes’ has not been declared
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:79,
                 from /Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:21:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWebView.h:54: error: ‘UIDataDetectorTypes’ has not been declared
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm: In function 'void -[EAGLView applicationDidFinishLaunching:](EAGLView
, objc_selector*, UIApplication*)’:
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:148: error: ‘glGenRenderbuffers’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:559)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:149: error: ‘glBindRenderbuffer’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:512)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:153: error: ‘glDeleteRenderbuffers’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:538)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:154: error: ‘glBindRenderbuffer’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:512)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:162: error: ‘glGenRenderbuffers’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:559)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:163: error: ‘glBindRenderbuffer’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:512)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:164: error: ‘glRenderbufferStorage’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:601)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:165: error: ‘glFramebufferRenderbuffer’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:553)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:172: error: ‘glGenFramebuffers’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:558)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:173: error: ‘glBindFramebuffer’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:511)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:178: error: ‘glFramebufferRenderbuffer’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:553)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:180: error: ‘glCheckFramebufferStatus’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:521)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm: In function ‘void -[EAGLView RenderScene](EAGLView*, objc_selector*)’:
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:250: error: ‘glBindRenderbuffer’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:512)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm: In function ‘void -[EAGLView dealloc](EAGLView*, objc_selector*)’:
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:279: error: ‘glDeleteRenderbuffers’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:538)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:283: error: ‘glDeleteRenderbuffers’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:538)
/Users/rainer/Downloads/Coding/SDKPackage_OGLES2/TrainingCourse/01_Initialization/OGLES2/Build/iPhone/…/…/OGLES2Initialization_iPhone.mm:286: error: ‘glDeleteFramebuffers’ is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h:536)

In addition to setting the “Base SDK” to 4.1 you should also set the “iOS Deployment Target” (in the same dialog under “Deployment”) to at least “3.0” (for both the project and the target; and any additional projects like the OGLES2Tools).

Hi Martin,

that did it. Thanks for your help!

Cheers,
urbZZ