I want to learn GLFW for making GUI app, so I installed it and placed it in the include folder of gcc (mingw32). I wrote that code :
#include <GL/gl.h>
#include <GLFW/glfw3.h>
int main(int argc, char* argv[]) {
glfwInit();
GLFWwindow* window = glfwCreateWindow(720, 480, "Test", NULL, NULL);
while (!glfwWindowShouldClose(window)) {
glClear(GL_COLOR_BUFFER_BIT);
glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
glfwPollEvents();
glfwSwapBuffers(window);
}
glfwDestroyWindow(window);
glfwTerminate();
return 0;
}
And I entered this command:
gcc main.c -o main.exe -lglfw -lgl
Note : I use Windows 10
I tried to install gcc again but it doesn’t work.