Most compilers create a.out by default. Usually one uses "-o output_name" to name the actual program. If your program compiled and linked ok, you should be able to run a.out by typing "a.out" and then hitting ENTER.

Using makefiles will greatly aid your programming. A basic makefile for Hello is:

make is the program that reads Makefile and executes instructions in it. GNU make has several implicit rules, so all need not be written. Rules have overall form of:

12

target : dependencies
commands

kooth had a slight typo on his example.

The first rule says that in order to create file named 'Hello', one has to have a file named 'Hello.o', and that the command to run is 'gcc -c Hello.c'. The -c flag to gcc says not to run linker. Therefore, 'gcc -c Hello.c' will produce an object file named 'Hello.o'.

The second rule supposedly tells how to convert Hello.c into Hello.o. It's proper command was on line 3.

'gcc Hello.c -o Hello' makes gcc both compile Hello.c into object file and then link that object file into binary named 'Hello'. That is how you would call it from command line. Thus, try 2: