I'm following this tutorial to learn OpenGL, but I'm having trouble compiling since the compiler can't find one of the header files.
This is the file I'm trying to compile:
#include <glad/glad.h>
#include <GLFW/glfw3.h>
int main() {
return 0;
}
To compile, I'm using
$ gcc -o sandbox sandbox.cpp -lGL -lGLU -lglut
and I get the following error:
sandbox.cpp:1:23: fatal error: glad/glad.h: No such file or directory
#include <glad/glad.h>
^
compilation terminated.
I followed the first two sections of this wiki to install OpenGL and libraries.
I think the problem is either the wrong compile command or a flaw in my OpenGL installation.
glad.h
is not in a default OpenGL install. Do you have it somewhere in your computer? I'd guess you don't, and you'd need to get it from somewhere... – Semiliquid