Skip to content

Instantly share code, notes, and snippets.

@khodzha
Created March 15, 2020 15:43
Show Gist options
  • Save khodzha/4569f7ad4fa48f486763066f6355ab2a to your computer and use it in GitHub Desktop.
Save khodzha/4569f7ad4fa48f486763066f6355ab2a to your computer and use it in GitHub Desktop.
g++ src/glad/src/glad.c src/main.cpp \
-I./src/headers \
-I./src/glad/include \
-I./src/glfw/include \
-L./src/glfw/glfw-build/src \
-lglfw3 -lGL -lX11 -lpthread -lXrandr -lXi -ldl \
-std=c++11
In file included from ./src/headers/main.h:3:0,
from src/main.cpp:1:
./src/glad/include/glad/glad.h:47:8: error: expected unqualified-id before string constant
extern "C" {
^~~
src/main.cpp: In function ‘int main()’:
src/main.cpp:22:28: error: ‘GLADloadproc’ was not declared in this scope
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
^~~~~~~~~~~~
src/main.cpp:22:28: note: suggested alternative: ‘GLFWvkproc’
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
^~~~~~~~~~~~
GLFWvkproc
src/main.cpp:22:10: error: ‘gladLoadGLLoader’ was not declared in this scope
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
^~~~~~~~~~~~~~~~
In file included from ./src/headers/main.h:3:0,
from src/main.cpp:1:
./src/glad/include/glad/glad.h:1650:20: error: ‘glad_glViewport’ was not declared in this scope
#define glViewport glad_glViewport
^
src/main.cpp:30:5: note: in expansion of macro ‘glViewport’
glViewport(0, 0, 800, 600);
^~~~~~~~~~
./src/glad/include/glad/glad.h:1650:20: note: suggested alternative: ‘glViewport’
#define glViewport glad_glViewport
^
src/main.cpp:30:5: note: in expansion of macro ‘glViewport’
glViewport(0, 0, 800, 600);
^~~~~~~~~~
./src/glad/include/glad/glad.h:1554:22: error: ‘glad_glClearColor’ was not declared in this scope
#define glClearColor glad_glClearColor
^
src/main.cpp:37:9: note: in expansion of macro ‘glClearColor’
glClearColor(0.f, 0.f, 0.f, 0.f);
^~~~~~~~~~~~
./src/glad/include/glad/glad.h:1554:22: note: suggested alternative: ‘glClearColor’
#define glClearColor glad_glClearColor
^
src/main.cpp:37:9: note: in expansion of macro ‘glClearColor’
glClearColor(0.f, 0.f, 0.f, 0.f);
^~~~~~~~~~~~
./src/glad/include/glad/glad.h:1551:17: error: ‘glad_glClear’ was not declared in this scope
#define glClear glad_glClear
^
src/main.cpp:38:9: note: in expansion of macro ‘glClear’
glClear(GL_COLOR_BUFFER_BIT);
^~~~~~~
./src/glad/include/glad/glad.h:1551:17: note: suggested alternative: ‘glClear’
#define glClear glad_glClear
^
src/main.cpp:38:9: note: in expansion of macro ‘glClear’
glClear(GL_COLOR_BUFFER_BIT);
^~~~~~~
src/main.cpp: In function ‘void framebuffer_size_callback(GLFWwindow*, int, int)’:
./src/glad/include/glad/glad.h:1650:20: error: ‘glad_glViewport’ was not declared in this scope
#define glViewport glad_glViewport
^
src/main.cpp:53:5: note: in expansion of macro ‘glViewport’
glViewport(0, 0, width, height);
^~~~~~~~~~
./src/glad/include/glad/glad.h:1650:20: note: suggested alternative: ‘glViewport’
#define glViewport glad_glViewport
^
src/main.cpp:53:5: note: in expansion of macro ‘glViewport’
glViewport(0, 0, width, height);
^~~~~~~~~~
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment