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
demo\hello.pp
) simply type :
ppc386 helloat 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 hellounder DOS, and underLINUX you could type
ppc386 -Up/usr/lib/fpc/0.99.7/linuxunits helloThis 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 :
helloIf all went well, you should see the following friendly greeting:
Hello worldIn 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.