[fpc-pascal] Free Pascal Directories

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Oct 2 15:50:18 CEST 2014


On 02 Oct 2014, at 15:30, Brian wrote:

> Thanks for all the commandline suggestions , but my question is  
> about using
> Geany as the IDE , not running the compiler from the commandline.

Geany itself will call the compiler via the command line, so it  
presumably has ways to specify additional command line options.

> If the directive is added (below) to the main program FPC will fail  
> to find
> the unit directory i386-linux.
> {$UNITPATH .../fpgui/fpgui-1.2/src/units/i386-linux}

Note that "..." is not a valid directory specifier. Also note that if  
you use a relative path, it should be relative to the location of the  
source file (and not relative to e.g. the top level directory of your  
project).

> To make it work you must include the absolute directory path such as :
> {$UNITPATH /home/mydir/fpgui/fpgui-1.2/src/units/i386-linux}  and  
> then it
> only finds the first unit in the uses list and cannot find the rest  
> of the
> units in i386-linux.
>
> Why doesn't FPC continue to look for units in the directory  
> specified by
> $UNITPATH ?

Tell Geany to pass the command line option -vtu to the compiler. The  
compiler will then print out which directories it searches for which  
unit files.


Jonas



More information about the fpc-pascal mailing list