Hello
file extensions
xx.pp
xx.ppu, binary file,uis unit. Axx.ppumust be associated with axx.ofile to be usable
xx.pas
xx.o
fpc ./hello.pp will generate two files: ./hello and ./hello.o.
We can delete ./hello.o in this case since ./hello is an executable.
fpc hello
unit search path
Unit search path:
-Fu/some/path/to/some/dir
By default, the environment variable FPCDIR is also on the unit search path.
If FPCDIR is not set, it is /usr/local/lib/fpc/FPCVERSION by default.
For instance it is /usr/local/lib/fpc/3.2.2 on my macOS.
# on macOS
ls /usr/local/lib/fpc/3.2.2/units/
aarch64-darwin i386-darwin    x86_64-darwin
# on Ubuntu
fangjun@ubuntu23-04:/mnt/sdb/shared/fpc-3.2.2/lib/fpc/3.2.2$ ls units/
x86_64-linux
See unit search paths:
fpc -vu ./hello.pp
To specify a compiler config file:
fpc @./my.cfg ./hello.pp
where ./my.cfg is something like below:
-Fu/etc/
include file search path
-I/some/path
-Fi/some/path
Both -I and -Fi can be used.
Config file
The default config file fpc.cfg is
$PWD/fpc.cfg
$HOME/.fpc.cfg
$PPC_CONFIG_PATH/fpc.cfg, wherePPC_CONFIG_PATHis an environment variable In theetcdirectory above thefpcbindirectory
/etc/fpc.cfg