[prev] [prev-tail] [tail] [up]

### 2.5 Testing the compiler

After the installation is completed and the optional environment variables are set as described above, your first program can be compiled.

Included in the Free Pascal distribution are some demonstration programs, showing what the compiler can do. You can test if the compiler functions correctly by trying to compile these programs.

The compiler is called

- fpc.exe under WI N D O W S, O S/2 and D O S.
- fpc under most other operating systems.

To compile a program (e.g demo\hello.pp) simply type :

       fpc hello

at the command prompt. If you don’t have a configuration file, then you may need to tell the compiler where it can find the units, for instance as follows:

     fpc -Fuc:\pp\units\go32v2\rtl hello

under D O S, and under L I N U X you could type

     fpc -Fu/usr/lib/fpc/NNN/units/linux/rtl hello

(replace NNN with the version number of Free Pascal that you are using). This is, of course, assuming that you installed under C:\PP or /usr/lib/fpc/NNN, respectively.

If you got no error messages, the compiler has generated an executable called hello.exe under D O S, O S/2 or WI N D O W S, or hello (no extension) under U N I X and most other operating systems.

To execute the program, simply type :

       hello

If all went well, you should see the following friendly greeting:

     Hello world

[prev] [prev-tail] [front] [up]