Tag Archives: GLUT

Error: unable to open include file: ‘GL / glut. H’

Today, someone else’s source program appeared such a problem, the first thought is the lack of files, really after viewing the lack of some toolkits, in this solution is offered, for your reference:
1. Download the GLUT Toolkit. https://download.csdn.net/download/xianhua7877/10473663
2, will download the package, Will get five documents, including GlU32. Lib glut32. DLL glut32. Lib glut. DLL glut. H glut. Lib
3, let the glut of decompression. H into the C:/Program Files/Microsoft Visual Studio 9.0/VC/include the folder.
4. Put the Glut. lib and Glut32.lib Files in the C:/Program Files/Microsoft Visual Studio 9.0/VC/lib folder where the static function libraries are located.
5. Put the extracted Glut. DLL and Glut32.dll in the system32 folder under the operating system directory.
6. This step is very important, this step is very important, this step is very important, run again, if the error is still, then change the header file’s original name #include <; GL/glut.h> For the # include & lt; glut.h> .

The solution of configuring OpenGL in vs2017

I’ve just tried to mesh the sphere using OpenGL in the last two days. The solution to configure OpenGL in VS2017 is as follows:
Running is the link of https://blog.csdn.net/xdg_blog/article/details/52864872 code, the following need library file is also for this code, need to add other library method.
 
1. Download glut in the website, website link: https://www.opengl.org/resources/libraries/glut/.

2. The downloaded file is as follows:

A. Put the two lib files Glut.lib and Glut32.lib into the directory:
D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ Lib \x86
B. Put Glut. DLL and Glut32.dll into a directory: C:\Windows\syswow64
Under 64-bit Windows: 64-bit EXE and DLL are in the directory C :\ Windows \ System32, and 32-bit EXE and DLL are in the directory C :\ Windows \ SYSWOW64. So note that registering a 32-bit OCX or DLL on a Win64-bit system requires copying the 32-bit OCX or DLL to the C :\ Windows \syswow64\ directory. C :\ Windows \ SYSWOW64 \ REGSVR32 XXXXXXXX. OCX or DLL.)
C. In the directory: D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ Include, create a new folder GL and put the header file in GL folder.
3. In VS2017, the configuration is as follows. First create a new C ++ project, then open the toolbar: Project ->; Properties:
A. general – & gt; Character set – & gt; Is not set

B. Linker ->; Conventional – & gt; Add the library directory, add OpenGL library file directory and its own library file directory. Write the path where the two lib files are placed.
D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ Lib
D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ Lib \x86

C. Linker ->; Input – & gt; Attach dependencies. Add the individual lib files from OpenGL (Glut.lib and Glut32.lib are the only ones added here), separated by English keyboard semicolons.

Note: There are other ways on the web to set: linker ->; System – & gt; Subsystem – & gt; SUBSYSYTEM: WINDOWS. But I’ve tried setting this to not work, so just leave it unset by default. (Although I don’t know why ~
Finally all the way down to determine the configuration of good ~

The solution of OpenGL not displaying normally in win7 system

These days I want to have a look at OpenGL, according to the online introduction to use the GLUT plug-in on Windows 7 VS2008. After the GLUT plug-in is installed, the program will compile, but at run time, the GLUT window will either be white or stuck, not properly.
I thought Windows 7 was incompatible with the GLUT plugin. Inadvertently see in online (http://bbs.tgbus.com/thread-1707009-1-1.html) said today may be the graphics driver (I is amd hd 8570 m). So, with 360 hardware master detection, the original their graphics card driver is too old. After updating the video card driver, it still can’t display normally. In right click on the desktop, select “configuration can exchange CARDS”, appear amd graphics Settings, left corner of the window we recommend: swappable display card global Settings, a battery case and insert the power supply two Settings, choose to “maximize performance” (or choose according to need) can normal use openGL glut plugin.
If you have any questions, you can ask me in the thread

|-OpenGL – | some small problems about the glut Library

When you’re using OpenGL, if you can’t find the header file Glut. h, you probably don’t have a GLUT library installed on your computer
Install the glut library
1. Download the GLUT library toolkit
The glut library download address: http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip
2. The location of the GLUT library file


br>

Glut. H file
Placement is: C: \ Program Files \ Windows (x86) Kits \ \ Include \ 8.1 um \ gl

if you don't know oneself should put in that position, you can directly search gl. H to find this file in folder, or in the compiler directly see the gl. H file placement position, then put the glut. H on with gl. H with folder

Glut. Lib and glut32. Lib
Know the glut. H after placed the folder, it is convenient for many
is placed as follows: C: \ Program Files \ Windows (x86) Kits \ \ Lib \ winv6.3\8.1 um \ x64 and C: \ Program Files \ Windows (x86) Kits \ \ Lib \ winv6.3\8.1 um \ x86



Glut. DLL and glut32. DLL

C:\ windows\ System32
br> a>
>
: \ windows\ System32


>
C:\ windows\ System32