How can I add GLEW/Other includes in Visual Studio

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4

55 Replies - 1270 Views - Last Post: 02 February 2018 - 05:29 PM Rate Topic: -----

#16 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1437
  • View blog
  • Posts: 4,626
  • Joined: 20-March 10

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 09:44 AM

What does your includes look like at the top of your main code ?
Was This Post Helpful? 0
  • +
  • -

#17 FlamingBurrito15  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 13-December 17

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 10:06 AM

// Include standard headers
#include <stdio.h>
#include <stdlib.h>

// Include GLEW
#include <GL/glew.h>

// Include GLFW
#include <GLFW/glfw3.h>
GLFWwindow* window;

// Include GLM
#include <glm/glm.hpp>


This is the file that came with the tutorial zip from opengl-tutorial.org that I am using.
Was This Post Helpful? 0
  • +
  • -

#18 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1437
  • View blog
  • Posts: 4,626
  • Joined: 20-March 10

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 10:52 AM

And is there a GL Folder in your compilers include section and is there a glew.h there

if not search your c drive for glew.h

This post has been edited by snoopy11: 31 January 2018 - 10:52 AM
Reason for edit:: typo

Was This Post Helpful? 0
  • +
  • -

#19 FlamingBurrito15  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 13-December 17

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:03 AM

I have no idea where visual studio keeps its include folder...
Was This Post Helpful? 0
  • +
  • -

#20 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 6010
  • View blog
  • Posts: 20,661
  • Joined: 05-May 12

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:07 AM

And for us not sitting beside you, are you still trying to compile using the command prompt, or are you now exclusively compiling inside Visual Studio.

If you are using the command line, devenv.exe lives in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe" if you use the default installation options for VS2017. If you are using another version of Visual Studio, it'll be in a similar type of location with different edition and version numbers. But, you don't really need to know where it lives. If as you said that you are using the "Developer Command Prompt for VS 2017", then it would be in the PATH established within that window.

In general, though, if you are building C or C++ code at the command line, you do NOT want the "Developer Command Prompt for VS 2017". Instead you'll want to use the "x64 Native Tools Command Prompt for VS 2017" or the "x86 Native Tools Command Prompt for VS 2017". The native tools will have the various C/C++ environment variables set appropriately for the target build, unlike the generic "Developer Command Prompt" which is more geared towards building for .NET targets.

I'll have to echo snoopy11's opinion that this project is too advanced for you at this point in time. You really need to learn how to walk before you can run.

As for determining where VS keeps it's include folders, in either of the "Native Tools Command Prompt" windows, type in set INCLUDE and it will show you the environment variable value that lists all the include folders.
Was This Post Helpful? 1
  • +
  • -

#21 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1437
  • View blog
  • Posts: 4,626
  • Joined: 20-March 10

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:08 AM

Yes the op needs to learn the basics first like how to find files on a computer which is as basic as it gets...
Was This Post Helpful? 0
  • +
  • -

#22 FlamingBurrito15  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 13-December 17

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:12 AM

I prefer to do it this way because this is the easiest way for me to learn this. and also I was asking where the include folder was I don't need devenv.

I have looked everywhere on my computer and I have not found any include folder that VS uses
Was This Post Helpful? 0
  • +
  • -

#23 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1437
  • View blog
  • Posts: 4,626
  • Joined: 20-March 10

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:13 AM

have you tried searching for glew.h ? As i mentioned....
Was This Post Helpful? 0
  • +
  • -

#24 FlamingBurrito15  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 13-December 17

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:22 AM

Yes I have searched for glew.h and it only shows where I have kept the backup files for OpenGL
Was This Post Helpful? 0
  • +
  • -

#25 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1437
  • View blog
  • Posts: 4,626
  • Joined: 20-March 10

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:27 AM

well you havent installed the opengl core then....
Was This Post Helpful? 0
  • +
  • -

#26 FlamingBurrito15  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 13-December 17

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:28 AM

If the OpenGL core is the one installed from NuGet then yes I have installed it
Was This Post Helpful? 0
  • +
  • -

#27 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1437
  • View blog
  • Posts: 4,626
  • Joined: 20-March 10

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:36 AM

what do you mean by the 'backup' files anyway

this could be the location that we need to set INCLUDE to

https://msdn.microso...y/3600tzxa.aspx

http://in2gpu.com/20...io-using-nuget/
Was This Post Helpful? 0
  • +
  • -

#28 FlamingBurrito15  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 13-December 17

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:40 AM

By backup I mean I put the files in a safe place just in case something happens to the original files (It happened a lot before)
Was This Post Helpful? 0
  • +
  • -

#29 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1437
  • View blog
  • Posts: 4,626
  • Joined: 20-March 10

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:53 AM

Ok...What happened a lot before.....

not following you
Was This Post Helpful? 0
  • +
  • -

#30 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13758
  • View blog
  • Posts: 54,934
  • Joined: 12-June 08

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 11:55 AM

Did you not follow the link I gave you?

Honestly.. it takes a few minutes.

Create empty C++ project in Visual Studios.
Go to tools -> nuget package manager -> manage nuget packages.
Click browse.
Type in 'nupengl.core'
Install it.

Create a main, copy paste what ever, and off you go. At worst I think I may have changes the dependencies to 'GL'.

#include "GL\glew.h"
#include "GL\freeglut.h"


I compiled.. zero errors.. tinkered with a bit of the window code.. and off I went.
Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4