# GLEW and GLFW

**URL:** <https://discourse.glfw.org/t/glew-and-glfw/277>\
**Category:** support\
**Created:** [May 9, 2011, 10:54pm UTC](https://discourse.glfw.org/t/glew-and-glfw/277 "2011-05-09T22:54:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 9, 2011, 10:54pm UTC](https://discourse.glfw.org/t/glew-and-glfw/277/1 "2011-05-09T22:54:56Z")

</div>

**anonymous** wrote on [Monday, May 09, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/4e765d91/#0e49):

I’m trying to use GLEW with my GLFW project, and so far, haven’t gotten any  
way to resolve it. The way I do it is:

```
#include <gl/glfw.h>
#include <gl/glew.h>

```

With this, I get an error saying gl.h is defined already. If I switch the  
order, I get a whole slew of errors. There is more information on the errors  
I’m getting here: [http://switch.tk/190](http://switch.tk/190). How can I get it to have both GLEW  
and GLFW?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 9, 2011, 10:56pm UTC](https://discourse.glfw.org/t/glew-and-glfw/277/2 "2011-05-09T22:56:11Z")

</div>

**anonymous** wrote on [Monday, May 09, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/4e765d91/#0507):

Here’s the link, since it’s malformed above: [http://switch.tk/190](http://switch.tk/190)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 9, 2011, 11:20pm UTC](https://discourse.glfw.org/t/glew-and-glfw/277/3 "2011-05-09T23:20:15Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Monday, May 09, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/4e765d91/#a898):

Where did your glu.h header come from? My installation of VS 2010 does not  
have any glu.h header in that location, but instead uses one of the two from  
\Program Files\Microsoft SDKs. These are identical and I cannot get the error  
messages you linked to match these files in any meaningful way.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 9, 2011, 11:23pm UTC](https://discourse.glfw.org/t/glew-and-glfw/277/4 "2011-05-09T23:23:41Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Monday, May 09, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/4e765d91/#1257):

I’ll add that I’ve used GLEW and GLFW together for a number of years, using VS  
2005, 2008 and 2010, MinGW, Cygwin, and both GCC and Clang on both Linux and  
Mac OS X, all without having encountered as much as a warning, so your  
environment is probably unusual in _some_ way.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 9, 2011, 11:42pm UTC](https://discourse.glfw.org/t/glew-and-glfw/277/5 "2011-05-09T23:42:27Z")

</div>

**anonymous** wrote on [Monday, May 09, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/4e765d91/#cab1):

All my OpenGL related files are under my gl/ folder, and this includes  
gl/glu/glfw/glew.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 10, 2011, 12:19am UTC](https://discourse.glfw.org/t/glew-and-glfw/277/6 "2011-05-10T00:19:46Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Tuesday, May 10, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/4e765d91/#7de5):

Where did your glu.h header come from?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 10, 2011, 12:30am UTC](https://discourse.glfw.org/t/glew-and-glfw/277/7 "2011-05-10T00:30:09Z")

</div>

**anonymous** wrote on [Tuesday, May 10, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/4e765d91/#e56e):

the glu/gl headers came with the VC++ 2010 installation in the includes/gl/  
location
