Under normal circumstances, the need to install first GLUT. Download address: http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\ GL “
2. Let the glut of decompression. Lib and glut32. Lib in “” Programfiles (x86) 10.0 VC \ \ lib \ Microsoft Visual studio” (ditto)
3.
4.
4.
5.
5.
5.
5.
5.
5.
5. Open VS2010, open any project or create a new one, and be careful to add.c to the file name when creating the CPP file (for example, opengl.c). Under the Solution ->; Right-click item ->; Property – & gt; Configure properties ->; Input – & gt; Add a dependency, where you add opengl32.lib; glu32.lib ; glut32 ;
Possible problems:
ERROR LNK1104: Could not open the file ‘opengl32.lib glu32.lib glut32.lib’
1. Note that these files are connected by semicolon, change to opengl32.lib; glu32.lib ; glut32 ;
2. The compiler did not find the path to these files, so you need to manually add: right-click project ->; Property – & gt; VC++ directory, in the include directory and library directory to add the path to store these files.
“Stdafx. h” : No such file or directory
1. Verify that the environment configuration is: Properties →C/C++→ Precompiled Header → “No Precompiled Header”.
#include < #include < stdafx.h> In general, except for MFC projects, precompiled headers are not used.
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\ GL “
2. Let the glut of decompression. Lib and glut32. Lib in “” Programfiles (x86) 10.0 VC \ \ lib \ Microsoft Visual studio” (ditto)
3.
4.
4.
5.
5.
5.
5.
5.
5.
5. Open VS2010, open any project or create a new one, and be careful to add.c to the file name when creating the CPP file (for example, opengl.c). Under the Solution ->; Right-click item ->; Property – & gt; Configure properties ->; Input – & gt; Add a dependency, where you add opengl32.lib; glu32.lib ; glut32 ;
Possible problems:
ERROR LNK1104: Could not open the file ‘opengl32.lib glu32.lib glut32.lib’
1. Note that these files are connected by semicolon, change to opengl32.lib; glu32.lib ; glut32 ;
2. The compiler did not find the path to these files, so you need to manually add: right-click project ->; Property – & gt; VC++ directory, in the include directory and library directory to add the path to store these files.
“Stdafx. h” : No such file or directory
1. Verify that the environment configuration is: Properties →C/C++→ Precompiled Header → “No Precompiled Header”.
#include < #include < stdafx.h> In general, except for MFC projects, precompiled headers are not used.
Read More:
- Fatal error C1010: unexpected end of file encountered while looking for precompiled header. Did you forget to add “ා include” StdAfx. H to the source
- Vc2010 configuring OpenGL environment
- Vs compiling OpenGL project, the solution of unable to open the source file “GL / glaux. H” appears
- Some small problems in using vs2017
- Solve the problem of VC6.0 open crash and OpenGL glut32.lib library
- Solution of header file StdAfx. H “no such file or directory” in Visual Studio
- The solution of configuring OpenGL in vs2017
- Error in header file when calling OpenGL to open obj file in vs2013: unable to open include file: “GL / glut. H”: no such file or directories
- How to solve fatal error C1010!
- Using the third party OpenGL in codeblock
- IntelliSense: unable to open source file ‘StdAfx. H’
- Fatal error C1853 error occurs when there are mixed .c files in the VS project
- VS2010 compiler can’t open include file: “GL / glaux. H”: no such file or directory
- Solution of unable to open source file “StdAfx. H” in vs2013 / 2012
- Solution of VS2008 unable to open GL / glaux. H header file
- Configuring OpenGL in Code:: blocks
- A series of problems in configuring OpenGL development environment in vs2015
- The first day of OpenGL [vs2017 + OpenGL environment configuration]
- OpenGL class library and environment configuration under win10 and vs2015
- Using glut in CodeBlocks