# Compile glfw 3 without libglu1-mesa-dev \[conflict\]?

**URL:** <https://discourse.glfw.org/t/compile-glfw-3-without-libglu1-mesa-dev-conflict/594>\
**Category:** support\
**Created:** [July 17, 2013, 2:56pm UTC](https://discourse.glfw.org/t/compile-glfw-3-without-libglu1-mesa-dev-conflict/594 "2013-07-17T14:56:16Z")\
**Posts on this page:** 3\
**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:** [July 17, 2013, 2:56pm UTC](https://discourse.glfw.org/t/compile-glfw-3-without-libglu1-mesa-dev-conflict/594/1 "2013-07-17T14:56:16Z")

</div>

**[cellsheet](https://sourceforge.net/u/cellsheet/)** wrote on [Wednesday, July 17, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/d04b9c8c/#f3c0):

Hello, I am currently having missing modern OpenGL references, despite having all drivers installed. I have a feeling the root of this cause is because of libglu1-mesa-dev is conflicting with nvidia’s official .run driver files (I’m running on linux mint 15 with 319 stable drivers with a GTX 760 GPU). I had installed libglu-mesa-dev before and after installing the .run file (I did each seperately after reinstalling mint), yet I get this error:

main.cpp: In function ‘int main()’:  
main.cpp:18:27: error: ‘glGenVertexArrays’ was not declared in this scope  
main.cpp:19:35: error: ‘glBindBuffer’ was not declared in this scope

if I include GL/glew.h before the glfw3 header, then I get this error output:

/tmp/ccUn7ZJ0.o: In function `main': main.cpp: (.text+0x4b): undefined reference to`\_\_glewGenVertexArrays’  
main.cpp: (.text+0x5e): undefined reference to `\_\_glewBindBuffer’

Here is what I am using to compile my program: g++ main.cpp -o test `pkg-config glfw3 --static --cflags --libs`

I also found using #define GL\_GLEXT\_PROTOTYPES did not change the results of the output. I’m at my wit’s end with glfw3.h.

Here is my program and I know its very incomplete, I’m only compiling it to ensure i get these errors fixed for now: [http://pastebin.com/Ye2TJ1Yx](http://pastebin.com/Ye2TJ1Yx)

---

<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:** [July 17, 2013, 3:04pm UTC](https://discourse.glfw.org/t/compile-glfw-3-without-libglu1-mesa-dev-conflict/594/2 "2013-07-17T15:04:38Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Wednesday, July 17, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/d04b9c8c/#effc):

If you’re using GLEW then you need to link to it.

---

<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:** [July 17, 2013, 3:20pm UTC](https://discourse.glfw.org/t/compile-glfw-3-without-libglu1-mesa-dev-conflict/594/3 "2013-07-17T15:20:53Z")

</div>

**[cellsheet](https://sourceforge.net/u/cellsheet/)** wrote on [Wednesday, July 17, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/d04b9c8c/#effc/7711):

Alright, thanks
