Conflicting #include guards with Windows SDK
I created a profile using the example provided on the wiki:
lua52.exe LoadGen.lua -style=pointer_c -spec=gl -version=3.3 -profile=core core_3_3
Copying the generated files into my project but compiling (as an exe) gives the following errors:
1>c:\coding\test\src\main.c(13): warning C4013: 'glMatrixMode' undefined; assuming extern returning int 1>c:\coding\test\src\main.c(13): error C2065: 'GL_PROJECTION' : undeclared identifier 1>c:\coding\test\src\main.c(14): warning C4013: 'glLoadIdentity' undefined; assuming extern returning int 1>c:\coding\test\src\main.c(16): error C2065: 'GL_MODELVIEW' : undeclared identifier
gl\GL.h is being found by the compiler (as verified by adding a #error line to it).
I suspect that the declarations from GL.h are not being compiled because gl_core_3_3.h defines
__gl_h_ and others which the Microsoft-provided GL.h uses as a guard against multiple inclusion (
#ifndef __gl_h_). The result is that none of the GL-related identifers are declared.
The complete test program is attached.
System: Windows7 (x64) MS VisualStudio 2010 Professional glLoadGen v1.0.4
Thanks in advance.