I have this simple code
#include <stdio.h>
#include <OpenGL/glext.h>
#include <OpenGL/gl.h>
int main (int argc, const char * argv[])
{
printf("Hello, World!\n");
return 0;
}
If I comment out the line with "glext.h", it compiles and works fine in xcode 4, if I uncomment this line, I get 345 errors, most of which are "expected" before * "... What happens ?! both gl. h and glext.h are inside the OpenGL framework, but regardless of whether I enable it or not, I get the same error.I tried GCC 4.2, as well as LLVM GCC 4.2 and LLVM (in this case, 21 semantic and syntax errors) .
I am sure that my lack of experience with C causes this, but I am surprised that gl.h has no problems, but has glext.h.
Even if I try to compile gcc from the command line, I get a lot
/System/Library/Frameworks/OpenGL.framework/Headers/glext.h:3137: error: expected ‘)’ before ‘const’
Any ideas?
source