When you compile a unit, the compiler will by default always look for unit files.
To be able to differentiate between units that have been compiled as static or dynamic libraries, there are 2 switches:
Definition of one symbol will automatically undefine the other.
These two switches can be used in conjunction with the configuration file 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 |