Common Errors are as follows:
------------------ Configuration: glsample1-Win32 debug --------------------
Compiling resources...
Compiling...
Stdafx. cpp
D:/Microsoft Visual Studio/vc98/include/Gl. H (1152): Error c2144: syntax error: Missing '; 'before type 'void'
D:/Microsoft Visual Studio/vc98/include/Gl. H (1152): Error c2501: 'wingdiapi': Missing storage-class or type specifiers
D:/Microsoft Visual Studio/vc98/include/Gl. H (1152): Fatal error c1004: unexpected end of file found
Error executing cl.exe.
I have seen a lot of questions about this. In most OpenGL tutorials, only OpenGL support needs to include
# Include <Gl/Gl. h>
# Include <Gl/Glu. h>
# Include <Gl/Glaux. h>
Add opengl32.lib, glu32.lib, and Glaux to the project-> Settings-> link file. lib. For the above error, someone said that the # include <windows. h> put it in front of the file contained above. This is necessary, but it does not seem to solve the problem.
I tried it in the afternoon, including OpenGL support. In Project-> Settings-> link, opengl32.lib glu32.lib Glaux. Lib gdi32.lib user32.lib advapi32.lib is required.
The experiment is feasible and I hope to help you.