PropellerAds
OpenGL

Set Additional Dependencies OpenGL FreeGLUT and GLEW

PropellerAds

In this lecture, you can learn how to “Set additional dependencies OpenGL FreeGLUT and GLEW”.We can set external dependencies in Visual Studio with OpenGL. First download GLEW and freeGLUT file, Download now. Now we can execute the basic program of OpenGL with C++ in Computer Graphic. The basic code is also given in zip file. Copy the Code and paste in the Visual Studio. There is the following error when you can execute that code which is also given in ZIP file. The reason for coming to errors because we did not set the external dependencies. First, we will set the external dependencies of the program. To Set additional dependencies OpenGL FreeGLUT and GLEW to follow the given instructions or watch the video which is given below.

Set additional dependencies OpenGL FreeGLUT and GLEW

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

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.
  2. Go to C/C++ àGeneralàAdditional include Directories. Here we need to add the additional library to execute the program.
  3. Select right corner button Edit Button. Then Browsing pin will open click here. Then go where the GLEW and FreeGLUT already saved.
  4. First, add the freeGLUT. Note, only select include folder by a single click, not double-click. Next click ‘Select Folder’ button.
  5. We can also include directories same GLEW files as freeGLUT.
  6. When both files will be added then click on OK button.
  7. Now we will add linker additional files. Linker–>General–>Additonal library directories.
  8. Now we will add the lib file not include file. Select freeglut.lib and click on the “select folder” button.
  9. Next, same add the Glew’s lib file. When both files will be added then click the “OK” button.
  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.
  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’.
  • Here we add the ‘Freeglut.dll’ and ‘glew32.dll’ which is already given in ZIP file.
  • 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 enjoy this lecture “Set additional dependencies OpenGL FreeGLUT and GLEW”. Its a complete serious of OpenGL with C++. Are you a new visitor to my website? you can also read my 2nd lecture of OpenGL Serious “Download and Install Visual Studio”.Please also give your feedback, thank you.

About the author

ABDUL JABBAR

I'm a Web Developer, SEO Expert also interested in other Computer Fields that are used in these days and very helpful in Financial & Economic Like Computer Graphics etc...

Leave a Comment