How to install GLUT and OpenGL in Visual Studio 2012?

I just installed Visual Studio 2012 today and I was wondering how can you install GLUT and OpenGL on the platform?

+45
visual-studio-2012 opengl glut
Aug 29 '12 at 5:18
source share
11 answers

OpenGL should be present already - probably Freeglut / GLUT will be absent.

GLUT is very dated now and is not actively supported - so you should definitely use Freeglut. You do not have to change your code at all, and several additional functions appear.

You will find pre-packaged file sets here: http://freeglut.sourceforge.net/index.php#download If you do not see the "lib" folder, this is because you did not download the pre-packaged set. "Martin Payne Windows Binary Files" is located at the link above and is running on Windows 8.1 with Visual Studio 2013 at the time of this writing.

When you download them, you will find that the Freeglut folder has three subfolders: - bin folder: this contains dll files for runtime - include: header files for compilation - lib: contains library files for compilation / linking

Installation instructions usually suggest moving these files to the visual studio folder and to the Windows system folder. It is better to avoid this, as this makes your project less portable and makes it much harder if you ever need to change which version of the library you are using (old projects may suddenly stop working, etc.)

Instead (apologies for any inconsistencies, I base these instructions on VS2010) ... - put the freeglut folder in another place, for example. C: \ DEV - Open the project in Visual Studio - Open the project properties - There should be a tab for VC ++ Directories , here you must add the appropriate include and lib folders, for example: C: \ dev \ freeglut \ include and C: \ dev \ freeglut \ lib - (Almost) The final step is to make sure that the opengl lib file is actually linked at compile time. In the project properties, expand the linker menu and open the input tab. For additional dependencies, add opengl32.lib (you would assume that it would be connected automatically by simply adding GL / gl.h to your project, but for some reason this doesn't seem to be the case)

At this point, your project should compile OK. To run it, you also need to copy the freeglut.dll files to the project folder

+40
Mar 26 '13 at 16:04
source share

This is the GLUT installation guide. No free kick

First download this KBUT package from KB KB here

Extract the downloaded zip file and make sure you find the following

glut.h

glut32.lib

glut32.dll

If you have a 32-bit operating system, put the glut32.dll file in C:\Windows\System32\ , if your operating system has 64 bits, put it in the "C: \ Windows \ SysWOW64 \" folder (in the system directory)

Put glut.h C:\Program Files\Microsoft Visual Studio 12\VC\include\GL\ (NOTE: here 12 means your version of VS can be 8 or 10)

If you do not find VC and the following directories .. continue to create it.

Put glut32.lib in C:\Program Files\Microsoft Visual Studio 12\VC\lib\

Now open visual studio and

  • In Visual C ++, select Empty Project (or your existing project)
  • Go to Project -> Properties. Select "All Settings" from the "Configuration" drop-down menu in the upper left corner
  • Choose Linker โ†’ Input
  • Now right-click the โ€œAdditional Dependencyโ€ found in the Right panel and click โ€œEditโ€

now enter

opengl32.lib

glu32.lib

glut32.lib

(NOTE: each .lib in a new line)

What is it ... You have successfully installed OpenGL .. Continue and run your program.

Similar installation instructions allow you to add freeglut files with header files in the GL folder, lib in the lib folder, and dll in the System32 folder.

+30
Dec 13 '13 at 4:42 on
source share

OpenGL comes with Visual Studio. You just need to install the GLUT package (freeglut will be fine), which can be found on NuGet.

Open your solution, click "TOOLS-> NuGet Package Manager" โ†’ "Package Manager" to open the NuGet console, enter Install-Package freeglut .

-

For VS 2013, use nupengl.core .

+16
Oct 08
source share

Download the GLUT library. In the first step, copy the glut32.dll file and paste it into the C: \ Windows \ System32 folder. Repeat step glut.h and copy it to the folder C: \ Program Files \ Microsoft Visual Studio \ VC \ include and the third step glut32.lib and paste it into the folder c: \ Program Files \ Microsoft Visual Studio \ VC \ lib. Now you can create a visual project for the C ++ console application and include the glut.h header file, after which you can write the code for the GLUT project. If you are using a 64-bit Windows machine, then the library of paths and glitches may be different, but the process is similar.

+3
Aug 29 2018-12-12T00:
source share

For an easy and convenient way to do this, first download the pre-packaged release of freeglut from here . Then read its Readme.txt file.

I copied some important parts of this package here:

... Create a folder on your PC that can be read by all users, for example, "C: \ Program Files \ Common Files \ MSVC \ freeglut \" on a regular Windows system. Copy the "lib" and "include" folders from this zip archive to this place ... the freeglut dll can be placed in the same folder as your application ...

... Open the project properties and select "All configurations" (this is necessary to ensure that our changes are applied both for debugging and for release). Open the "General" section in the "C / C ++" section and configure the "include" folder you created above as the "Additional Link Directory". If you have more than one GLUT package that contains the file "glut.h", it is important to make sure that the freeglut include folder is above all other folders included in GLUT ... Open the "general" section in the "Linker" section and configure the "lib" folder ", created by you above, as an" additional library directory "...

+3
Feb 17 '13 at 10:34
source share

Yes visual studio 2012 express built the opengl library. the headers are in the C: \ Program Files \ Windows Kits \ 8.0 \ Include \ um \ gl folder and the lib files are in the C: \ Program Files \ Windows Kits \ 8.0 \ Lib \ win8 \ um \ x86 and C: \ Program Files folder \ Windows Kits \ 8.0 \ Lib \ win8 \ um \ x64. but the problem is integrating the glut with the existing one. I downloaded the library from http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip .. and deployed the files to ..... \ gl and .... \ lib \ win8 \ um \ x32 and dll in% system% / windows, respectively. Hope this solves the problem ...

+1
Feb 18 '13 at 6:44
source share

(a) Copy all the files from the include / GL folder and paste them into the C: \ Program Files \ Microsoft SDK \ Windows \ v7.0A \ Include \ gl folder.

(b) Copy all the files from the lib folder and paste them into the C: \ Program Files \ Microsoft SDK \ Windows \ v7.0A \ Lib folder.

(c) Copy the freeglut.dll file and paste it into the C: \ windows \ system32 folder.

+1
Jul 19 '13 at 6:06 on
source share

Use the NupenGL Nuget package . It is actively updated and works with VS 2013 and 2015, while the Freeglut Nuget package only works with earlier versions of Visual Studio (as of 10/14/2015).

Also, follow this blog post for simple instructions on working with OpenGL and Glut in VS.

+1
Oct 14 '15 at 22:42
source share

instructions for Vs2012

Install FreeGLUT

In 32-bit versions of windows

copy all the files to the include / GL folder in the folder C: \ Program Files \ Windows Kits \ 8.0 \ Include \ um \ gl

copy all the files in the lib folder to the folder C: \ Program Files \ Windows Kits \ 8.0 \ Lib \ win8 \ um \ (note: Lib \ freeglut.lib in the folder goes to x86)

copy the freeglut.dll file to C: \ windows \ system32

In 64-bit versions of windows: (not 100% sure, but try)

copy all the files to the include / GL folder in the folder C: \ Program Files (x86) \ Windows Kits \ 8.0 \ Include \ um \ gl

copy all the files in the lib folder to the folder C: \ Program Files (x86) \ Windows Kits \ 8.0 \ Lib \ win8 \ um \ (note: Lib \ freeglut.lib in the folder goes to x86)

copy the freeglut.dll file to C: \ windows \ SysWOW64

0
Aug 28 '13 at 17:59 on
source share
  • Create an empty win32 c ++ console console
  • Download a package called NupenGL Core from Nuget Package Manager (PM -> "Install-Package nupengl.core") except glm everything is configured
  • create Source.cpp and get started Happy Coding
0
Jun 18 '16 at 6:04 on
source share

To install Microsoft Visual Studio 2017 Community GLUT -

  • Download the header, dll and lib files from glutdlls37beta (linked in here )

  • Paste glut.h into C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\{14.11.25503}\include\GL Create a GL folder if it is not already specified. {Thing} may vary.

  • Paste glut.lib into C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\{14.11.25503}\lib\x64 . Paste glut32.lib into C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\{14.11.25503}\lib\x86 . {Thing} may vary.

  • Paste glut32.dll into C:\Windows\System32 . Paste glut.dll and glut32.dll into C:\Windows\SysWOW64 .

  • Follow the next Vishwanath gowda. Go to Project โ†’ Properties (All Configuration) โ†’ Linker โ†’ Input โ†’ Additional Dependencies-> edit (down arrow on the right end) Type-> opengl32.lib glu32.lib glut32.lib Click Ok โ†’ apply.

0
Oct 17 '17 at 6:21
source share



All Articles