Having successfully entered and saved your hello1.c file, it is now time to compile it:
- In a Terminal, command line, or console window (depending on your OS), with the current working directory the same as your hello1.c file, enter $ cc hello1.c.
- Once this is done and you have a new command-line prompt, verify that you have a file named a.out.
You have completed your first compiling phase of the program development cycle.
If the compiler spews out some error messages, try to read what the compiler is telling you and try to understand what error it is telling you to fix. Always focus on the very first error message first; later error messages are usually the result of the very first error. Then, go back to the editing phase and see where your entered program is different than what has been shown here. The two must match exactly. Then, come back to this phase; hopefully, your program will compile successfully (no error messages).
As we progress through this book, we'll add more compiler options to the cc command to make our life easier.