The OpenGL environment has been configured several times without success.
Today, I finally tried it, so I shared it, so that others can avoid detours.
My tool is VS2017
1. Method (download various library files)
Download the required files for OpenGL
http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip
Then you get five files:
Glut.dll Glut.dll Glut.Lib Glut.h
Find the directory.. \VC\Tools\MSVC\14.10.25017\include\gl So let’s put Glut.H in there.
Today, I finally tried it, so I shared it, so that others can avoid detours.
My tool is VS2017
1. Method (download various library files)
Download the required files for OpenGL
http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip
Then you get five files:
Glut.dll Glut.dll Glut.Lib Glut.h
Find the directory.. \VC\Tools\MSVC\14.10.25017\include\gl So let’s put Glut.H in there.
Find the directory.. \VC\Tools\MSVC\14.10.25017\lib\x86 Glut. lib, Glut32.lib
Finally, the
Glut. DLL and glut32.dll go in
C: \ Windows \ system32 folder (32-bit system) or C: \ Windows \ SysWOW64 (64 – bit systems).
2. Methods (using VS plug-ins)
Open VS and create a C++ project (Win32 Console – Blank Project)
Then click Project – Manage the NuGet package
Then click Browse – type Nupengl in the search bar
Then install (two if you have two)
——————————————————
One final test:
(plain)
The view plain
copy
The
- # include & lt; GL/glut.h> Void the Show () {glClear (GL_COLOR_BUFFER_BIT); GlRectf (0.5-0.1 f to 0.1 f, f, 0.5 f); GlFlush (); } int main (int arg c, char * argv []) {glutInit (& amp; Arg c, argv); GlutInitDisplayMode (GLUT_RGB | GLUT_SINGLE); GlutInitWindowPosition (100, 100); GlutInitWindowSize (400, 400); OpenGL glutCreateWindow (” “); GlutDisplayFunc (Show); GlutMainLoop (); Return 0; } ol>
Run it and you’ll see a white square
If there are no errors, the configuration is successful!
(if you try and succeed, remember thumb up ah )
Read More:
- Vc2010 configuring OpenGL environment
- The solution of configuring OpenGL in vs2017
- [graphics] exceptions in downloading and installing OpenGL in vs2017
- Configuring OpenGL in Chinese version of VS2010 and problem solving
- Configuring OpenGL in VS
- Vs compiling OpenGL project, the solution of unable to open the source file “GL / glaux. H” appears
- 1 vs20152017 + OpenGL to configure and draw a white rectangle
- Vs2017 installing OpenGL
- Configuring OpenGL in Visual Studio 2015
- |-OpenGL – | some small problems about the glut Library
- Configuring OpenGL in Code:: blocks
- A series of problems in configuring OpenGL development environment in vs2015
- On the configuration of OpenGL Red Book eighth edition environment in vs2013
- 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
- Solve the problem of VC6.0 open crash and OpenGL glut32.lib library
- OpenGL class library and environment configuration under win10 and vs2015
- The solution of using OpenGL’s Glu Library in qt5.2 under win7
- CodeBlocks configuring OpenGL
- Vs2019 OpenGL glut: error: unable to open include file: ‘GL / glut. H’: no such file or directory
- Using glut in CodeBlocks