Can't compile an example (missing GL header?)

Hello

I am trying to build this example: https://github.com/colinstein/minimalopengl/blob/master/test.c

I have gotten it to build before, but I came back to it and had the same error again. No idea how to fix it or what changed.

My OS is ubuntu 14.04 and I’m using code::blocks

The error I get is this:

/usr/local/include/GLFW/glfw3.h|147|fatal error: GL/glcorearb.h: No such file or directory

what confuses me is that when I go to my usr/include/GL their isn’t a glcorearb.h. I’m pretty sure I have all the right packages though…

thanks

FWIW, on Gentoo I have /usr/include/GL/glcorearb.h, which comes from mesa-11.0.6. It’s possible that the existence of that file varies depending upon whether you’re using Mesa or a proprietary OpenGL driver (e.g. nVidia’s).

Also, my glfw3.h only includes that file if GLFW_INCLUDE_GLCOREARB is defined. It’s possible that GLFW needs to be re-built if you change the system’s OpenGL implementation.

Normally, the package manager should handle such dependencies, but the fact that your glfw3.h is in /usr/local/include suggests you built it yourself, so you’ll also need to handle such interactions yourself.

[QUOTE=GClements;1284250]FWIW, on Gentoo I have /usr/include/GL/glcorearb.h, which comes from mesa-11.0.6. It’s possible that the existence of that file varies depending upon whether you’re using Mesa or a proprietary OpenGL driver (e.g. nVidia’s).

Also, my glfw3.h only includes that file if GLFW_INCLUDE_GLCOREARB is defined. It’s possible that GLFW needs to be re-built if you change the system’s OpenGL implementation.

Normally, the package manager should handle such dependencies, but the fact that your glfw3.h is in /usr/local/include suggests you built it yourself, so you’ll also need to handle such interactions yourself.[/QUOTE]

Yes I compiled it myself, If I knew about an easier way I would have done that

Not gonna lie, I’m totally lost right now. I just ran “cmake .” and “make install” again and it didn’t work

here is a tutorial that helped me getting started with opengl on linux (SDL2, GLEW, codeblocks)

[QUOTE=john_connor;1284252]here is a tutorial that helped me getting started with opengl on linux (SDL2, GLEW, codeblocks)

Thanks

What I ended up doing to fix it was just copying the header into my GL directory with gksudo [how I feel right now: :doh::doh::doh::doh:]