next up previous contents
Next: Compiler usage Up: Installing the compiler Previous: Optional configuration steps

Testing the compiler

After the installation is completed and the 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

To compile a program (e.g demo\hello.pp) simply type :
  ppc386 hello
at the command prompt. If you don't have a configuretion file, then you may need to tell the compiler where it can find the units, for instance as follows:
ppc386 -Upc:\pp\rtl\dos\go32v2 hello
under DOS, and underLINUX you could type
ppc386 -Up/usr/lib/fpc/0.99.7/linuxunits hello
This is, of course, assuming that you installed under C:\PP or /usr/lib/fpc/0.99.7, respectively.

If you got no error messages, the compiler has generated an executable called hello (no extension) under LINUX, and a file hello.exe under DOS.

To execute the program, simply type :

  hello
If all went well, you should see the following friendly greeting:
Hello world
In the DOS case, this friendly greeting may be preceded by some ugly message from the GO32 extender program. This unfriendly behavior can be switched off by setting the GO32 environment variable.



Michael Van Canneyt
Thu Sep 10 13:56:17 CEST 1998