views:

539

answers:

2

I have some C++ doing OpenGL drawing and am trying to figure out how to include the opengl headers without it giving me thousands of errors in the obj-c code.

+1  A: 

I'm not getting any errors.
Are you doing

#include <OpenGLES/ES1/gl.h>

?

RF

Rhythmic Fistman
+1  A: 

You can save your files as .mm instead of .cpp. You will still be able to use C++ functions within it, but you will also be able to #import the various include files you need, as well as mix C++ and Obj-C in code.

Oliver Hume