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:
- Problems in the second day of Android learning
- Error starting day: SELinux is not supported with the overlay 2
- Linux_ day07_ 05_ Configure common add, delete, modify and query commands in network
- Failed to talk to init day
- OpenGL learning — problems encountered in compiling OpenGL program for the first time
- Vc2010 configuring OpenGL environment
- OpenGL basic graphics programming – OpenGL and 3D graphics world
- Configuring OpenGL in Visual Studio 2015
- Configuring OpenGL in VS
- Vs2017 installing OpenGL
- 1 vs20152017 + OpenGL to configure and draw a white rectangle
- Vs2015 + OpenGL environment configuration
- The solution of configuring OpenGL in vs2017
- The simplest course of configuring OpenGL in vs2015
- A strange problem in compiling OpenGL program
- On the configuration of OpenGL Red Book eighth edition environment in vs2013
- CodeBlocks configuring OpenGL environment
- Configuring OpenGL in Chinese version of VS2010 and problem solving
- |-OpenGL – | some small problems about the glut Library
- CodeBlocks configuring OpenGL