In this lecture, you’ll learn about how to include Visual Studio Include Library (Set additional dependencies) and OpenGL FreeGLUT and GLEW Download.

We are going to set external dependencies in Visual Studio 2017 with OpenGL. Yet, Download FreeGlut and GLEW (OpenGL Libraries) for further process.

glew and glut download

FreeGLUT and GLEW Download

Download FreeGlut and Glew Library from Google Drive

Now we can execute the basic program of OpenGL with C++ in Computer Graphic.

Copy the code (Your own code of a program) and paste in the Visual Studio. There is the following error when you can execute that code.

The reason for coming to errors because we did not set the external dependencies and Freeglut.dll missing. First, we will set the external dependencies of the program.

To Set additional dependencies OpenGL FreeGLUT and GLEW to follow the given instructions or Please watch all the steps of the video which is given at the end of this lecture.

OpenGL in Visual Studio 2017

First, make sure that Visual Studio 2017 is downloaded and installed on your computer.

When you run the Visual Studio installer, make sure you select Custom Installation and add support for the C ++ language.

If you have already installed Visual Studio and have not added support for it, just rerun the installer, click “Edit,” and follow the steps above to add support for Visual C ++ follow it. If you have experienced any issue with the installation, then please must read the installation Guide of visual studio.

Visual Studio Include Library (Set additional dependencies)

  1. Open the new project.Visual Studio Include Library | OpenGL FreeGLUT and GLEW Download
  2. Next, select visual c++ after that select Empty project and also give the name of the project.Visual Studio Include Library | OpenGL FreeGLUT and GLEW Download
  3. There you can see Solution Explorer if Solution Explorer does not show then you can show it by view button.Visual Studio Include Library | OpenGL FreeGLUT and GLEW Download
  4. Then, right click on the project name in the Solution Explorer. And select add> new items.set additional dependencies of OpenGL with C++
  5. Select the C++(.cpp) file. Also, give the name of the project. Then click the add button.Set additional dependencies OpenGL FreeGLUT and GLEW
  6. Now new need base code. Which you have already downloaded the ZIP file. Copy the code and paste it into the visual studio.Set additional dependencies OpenGL FreeGLUT and GLEW

Now, need to set the environment or external dependencies of Progam to run.

  1. Right-click on the project name and then click on properties.Visual Studio Include Library | OpenGL FreeGLUT and GLEW Download
  2. Go to C/C++ General Additional include Directories. Here we need to add the additional library to execute the program.Visual Studio Include Library | OpenGL FreeGLUT and GLEW Download
  3. Select the right corner button Edit Button. Then Browsing pin will open click here. Then go where the GLEW and FreeGLUT already saved.set external dependencies
  4. First, add the freeGLUT. Note, only select include folder by a single click, not double-click. Next click the ‘Select Folder’ button.external dependencies of openGL
  5. We can also include directories same GLEW files as freeGLUT.OpenGL series
  6. When both files will be added then click on OK button.Set additional dependencies OpenGL FreeGLUT and GLEW
  7. Now we will add linker additional files. Linker–>General–>Additonal library directories.OpenGL with C++ in urdu
  8. Now we will add the lib file not include file. Select freeglut.lib and click on the “select folder” button.Download FreeGLUT and GLEW Files
  9. Next, same add the Glew’s lib file. When both files will be added then click the “OK” button.GLUT and Glew Files
  10. Now we go to inside the linker–>Input–>additional dependencies. Then click on the Edit button here we write “freeglut.lib” and “glew32.lib”.  And click “OK” button.HOMEWEB DESIGNING COMPUTER GRAPHICS BOOTSTRAPCONTACT US Home / OpenGL / Set additional dependencies OpenGL FreeGLUT and GLEW PropellerAds Set additional dependencies OpenGL FreeGLUT and GLEW
  11. Now click on the “apply” button then click “OK” button.

Now add the Freeglut.dll  and glew32.dll which is already given in ZIP file.

  • Right-click on the project name in the Solution Explorer. Then click “Open Folder in Window Explorer”.Visual Studio Include Library | OpenGL FreeGLUT and GLEW Download
  • Here we add the Freeglut.dll and “glew32.dll” which is already given in ZIP file.Set dependencies of OpenGL code
  • Now your program is ready for execution. Now “Rebuild Solution” or Press Ctrl+Shift+B. Next “start Debugging” or Press F5. You can see the following output window will appear on the screen.Set additional dependencies OpenGL FreeGLUT and GLEW

I hope you enjoyed this lecture “How to download FreeGlut.dll and how to set additional dependencies of the program?”. It’s a complete series of OpenGL with C++. You can also download this file and use it in any other project as well.

Categorized in: