badmai.blogg.se

How to create makefile for c program in linux in debian
How to create makefile for c program in linux in debian








how to create makefile for c program in linux in debian how to create makefile for c program in linux in debian how to create makefile for c program in linux in debian

This makes it easy to recompile and test your program without typing the long gcc commands above.Ī makefile is always called Makefile (with no extension). You are required to use a makefile to compile your programs for all assignments. On Mac OS X you need to change the #include directives slightly to: #include Īnd compile it by typing (in a terminal window): gcc -Wno-deprecated-declarations -o hello hello.c -framework GLUT -framework OpenGL -framework Carbon Only started experimenting with this, although some students used it Windows Subsystem for Linux aka WSL, which appeared late 2016. On Windows we have previously suggested students install xming or cygwin or a Linux virtual machine in VirtualBox. Here’s a simple OpenGL program that does nothing: #include Īssuming this program is saved in hello.c, you can compile it by typing: gcc -o hello hello.c -lglut -lGLU -lGL Compiling OpenGL programs on Linux, OS X and Windows










How to create makefile for c program in linux in debian