In VS2010, the compiler cannot open the file “GL / glaux. H”: no such file or directory

 
We recently tested an example OpenGL program:
#include < GL/gl.h>
#include < GL/glaux.h>
#include “glos.h”
 
void main(void)
{
auxInitDisplayMode(AUX_SINGLE|AUX_RGBA);
,0,500,500 auxInitPosition (0);
auxInitWindow(“simple”);
 
GlClearColor (0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
GlColor3f (1.0, 0.0, 0.0);
GlRectf (0.5, 0.5, 0.5, 0.5);
 
glFlush();
_sleep(1000);
}
 
It runs normally under VC6.0, but under VS2010 there is a compilation error as follows:
1> D :\elec\mymfctest\vs2010p\openglapps\opengltest\opengltest.cpp(4): fatal error C1083: Could not open included file: “GL/glaux.h” : No such file or directory
It seems that this error can be found in versions VS2008 and above.
Only two Files can be seen in the path C:\Program Files\Microsoft SDKS \Windows\ V7.0 A\Include\gl after VS2010 installation
Gl. h and glu. H instead of glaux. H,
C:\Program Files\Microsoft Visual Studio\VC98\Include\GL
The next one has three files
H, glu. H, and glaux. H, so the relevant header files are not found in VS2010.
The glaux.lib library file is not found in the VC6.0 installation path C:\Program Files\Microsoft SDKS \Windows\ V7.0 A\ lib, but in the VS2010 installation path C:\Program Files\Microsoft SDKS \Windows\ V7.0 A\ lib.
The solution is to copy the glaux. H and glaux. Lib files from their respective folders to the path referenced by default in VS2010 if you have VC6.0 installed. It is possible that the application will also need glaux. DLL support at runtime, which can also be downloaded.

Read More: