When you compile a unit, the compiler will by default always look for unit les.
To be able to di erentiate between units that have been compiled as static or dynamic libraries, there are 2 switches:
De nition of one symbol will automatically unde ne the other.
These two switches can be used in conjunction with the con guration le fpc.cfg. The existence of one of these symbols can be used to decide which unit search path to set. For example, on linux:
# Set unit paths
#IFDEF FPC_LINK_STATIC -Up/usr/lib/fpc/linuxunits/staticunits #ENDIF #IFDEF FPC_LINK_DYNAMIC -Up/usr/lib/fpc/linuxunits/sharedunits #ENDIF |
With such a con guration le, the compiler will look for it's units in di erent directories, depending on whether -XD or -XS is used.