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

cellsheet wrote on Wednesday, July 17, 2013:

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

elmindreda wrote on Wednesday, July 17, 2013:

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

cellsheet wrote on Wednesday, July 17, 2013:

Alright, thanks