CSC180H1 Lecture Notes - Lecture 15: A.Out, Fibonacci Number, Gnu Compiler Collection
Document Summary
Since the last lecture, you will have typed in one c program successfully (since it was a copy-and-paste exercise), compiled it, and run it. Recall: if your program source code is in a file called "prog. c", then the steps to compile this are: rm -f a. out, gcc prog. c, . /a. out. Where: removes the old executable "a. out" file that you may have created prior, invokes the c compiler to compile your "prog. c" and produce a new a. out, runs the a. out executable. If "gcc prog. c" always produces a new a. out, then why do we have to. Suppose you have an old a. out in your directory, from an old version of your program. Now suppose you modify your program in test. c, say to add a feature, and mistakenly introduced a syntax error. Then, when you compile proc. c, you will not get a new a. out, but rather the program will spit a bunch of error messages.