I am trying to compile the minimalist C opengl code in https://github.com/fogleman/HelloGL on my Ubuntu 18.04 system, but I get the following error:
gcc -c -o build/matrix.o -std=c99 -O3 src/matrix.c
gcc -o main build/shader.o build/main.o build/util.o build/matrix.o -lglew -lglfw3 -framework Cocoa
-framework OpenGL -framework IOKit -framework CoreVideo -lm
gcc: error: Cocoa: No such file or directory
gcc: error: OpenGL: No such file or directory
gcc: error: IOKit: No such file or directory
gcc: error: CoreVideo: No such file or directory
gcc: error: unrecognized command line option ‘-framework’
gcc: error: unrecognized command line option ‘-framework’
gcc: error: unrecognized command line option ‘-framework’
gcc: error: unrecognized command line option ‘-framework’
Makefile:24: recipe for target 'main' failed
I do realize the reason for this is the following line in the MakeFIle, which is made for OSX (presumably):
LIBS = -lglew -lglfw3 -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo
Is there a way of adapting this line to make it work on a GNU/Linux system? Or does it need to have to be linked to the Cocoa framework?