AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
How to write a makefile for c program2/12/2023 ![]() You could add flags such as -Wall (for warnings) or -std=gnu99 (to use the updated GNU99 specification), or -o to set the name of the resulting executable. gcc file1.c file2.c file3.c compiles three files and links them together into an executable named a.out. It is a single file that contains all the files and settings to compile a project and link it with the appropriate libraries.įor simple projects with uncomplicated settings, you can build without a makefile by directly invoking a compiler like GCC, e.g. Make is a program that dates back to 1976, and it is used to build projects with dependencies such that it only recompiles files that have been changed, and avoids having to type lengthy compile commands. In CS107, we will use a program called make to compile our programs. ![]() ![]() Written by Chris Gregg and Kevin Montag, with modifications by Nick Troccoli
0 Comments
Read More
Leave a Reply. |