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:
- The solution of configuring OpenGL in vs2017
- Configuring OpenGL in VS
- A series of problems in configuring OpenGL development environment in vs2015
- The simplest course of configuring OpenGL in vs2015
- Configuring OpenGL development environment in win10 + vs2015 (including the method of installing 32-bit and 64 bit libraries)
- Vs2019 nuget configuring OpenGL
- OpenGL + vs2015 environment configuration problem solving
- Vs2015 configuring OpenGL (glfw Library)
- Write about the problems and solutions when configuring OpenGL in vs2015
- Solving the problem of Chinese garbled code in qtring
- Problems encountered in configuring OpenGL development environment in vs2015
- OpenGL function reference (Chinese version)
- Vs2015 configuring OpenGL (glfw, glew)
- Vs2015 configuring OpenGL development environment: configuration of glfw library and glad Library
- Configuring OpenGL in Code:: blocks
- Configuring OpenGL with vs2019
- Solution to the problem that OpenGL can’t find glew32.dll in vs2019
- Problem solving – vs debugging window flash solution
- Configuring OpenGL in Visual Studio 2015
- Vc2010 configuring OpenGL environment