The head guard of glad/gl.h won't work as it should when header only is selected in glad2 generator
kiroeko opened this issue · comments
This is on purpose and follows the same pattern what the stb* libs use.
Include glad with GLAD_GL_IMPLEMENTATION
in a singular .c
file as the last include:
#include ...
#include ...
#include ...
#define GLAD_GL_IMPLEMENTATION
#include <glad/gl.h>
This could be your main.c
or a separate source file which only includes glad and nothing else.