0
Link build and run program without IDE (C, OPENGL, GLFW, GLEW)
Hi, so I have one project in visual studio, it's just a simple empty window program written in C with GLFW as window handler and GLEW for accesing OpenGL functions. I'm wondering how can I compile it with GCC. gcc main.c -o my_program will compile the code and create executable with the name my_program. What if I want to link some libraries (like GLFW and GLEW)?. How would the compile command look like?
2 Respuestas
- 1
gcc main.c -o my_program -lGLEW
For GLFW -lglfw
- 1
@Alex Are you sure this is everything I need? OK, i assume that the header files are in same folder. the libs have different names and how about Additional dependecies? In VS 2019 I have to add opengl32.lib, glew32.lib and glfw3.lib