3.2 Compiling a program

Compiling a program is very simple. Assuming that you have a program source in the le prog.pp, you can compile this with the following command:
  fpc [options] prog.pp

The square brackets [ ] indicate that what is between them is optional.

If your program le has the .pp or .pas extension, you can omit this on the command line, e.g. in the previous example you could have typed:

  fpc [options] prog

If all went well, the compiler will produce an executable le. You can execute it straight away, you don't need to do anything else.

You will notice that there is also another le in your directory, with extensions .o. This contains the object le for your program. If you compiled a program, you can delete the object le (.o), but not if you compiled a unit.

Then the object le contains the code of the unit, and will be linked in any program that uses the unit you compiled, so you shouldn't remove it.