Has anybody seen link errors after adding the OpenGL framework? I have an application that runs fine on both the device and the simulator, but after I add the OpenGL framework, it starts getting link errors when I compile for the simulator. At this point, even after I remove the OpenGL framework, my project can no longer run on the simulator.
My app also uses MediaPlayer, AVFoundation and AudioToolbox frameworks.
I also tried a different tactic. I started with XCode's starter OpenGL app. I confirm it runs fine on both device and simulator. I then start adding my domain classes (no view-related code) to the project. I also add the MediaPlayer, AVFoundation and AudioToolbox frameworks. When I build, I start getting errors. I remove everything I've added (my code and the add'l frameworks) and I still get the link errors.
Here's a sampling of the error messages I get:
Code:
"_glGetRenderbufferParameterivOES", referenced from:
-[EAGLView createFramebuffer] in EAGLView.o
-[EAGLView createFramebuffer] in EAGLView.o
"_glCheckFramebufferStatusOES", referenced from:
-[EAGLView createFramebuffer] in EAGLView.o
-[EAGLView createFramebuffer] in EAGLView.o
"_glDeleteFramebuffersOES", referenced from:
-[EAGLView destroyFramebuffer] in EAGLView.o
".objc_class_name_EAGLContext", referenced from:
literal-pointer@__OBJC@__cls_refs@EAGLContext in EAGLView.o
"_kEAGLDrawablePropertyColorFormat", referenced from:
_kEAGLDrawablePropertyColorFormat$non_lazy_ptr in EAGLView.o
"_glClearColor", referenced from:
-[EAGLView drawView] in EAGLView.o
"_kEAGLDrawablePropertyRetainedBacking", referenced from:
_kEAGLDrawablePropertyRetainedBacking$non_lazy_ptr in EAGLView.o
"_objc_msgSendSuper", referenced from:
-[EAGLView initWithCoder:] in EAGLView.o
-[EAGLView dealloc] in EAGLView.o
"___CFConstantStringClassReference", referenced from:
cfstring=failed to make complete framebuffer object %x in EAGLView.o
"_glGenRenderbuffersOES", referenced from:
-[EAGLView createFramebuffer] in EAGLView.o
"_glBindRenderbufferOES", referenced from:
-[EAGLView drawView] in EAGLView.o
-[EAGLView createFramebuffer] in EAGLView.o
"_glOrthof", referenced from:
-[EAGLView drawView] in EAGLView.o
"_glFramebufferRenderbufferOES", referenced from:
-[EAGLView createFramebuffer] in EAGLView.o
"_UIApplicationMain", referenced from:
_main in main.o
The code still compiles when targetting a device, but I've seen video tutorials that show OpenGL works on the simulator. What am I doing wrong?