[fpc-devel] fpc.cfg #INCLUDE directive

patspiper patspiper at gmail.com
Sun May 31 19:28:43 CEST 2015

On 31/05/15 19:01, Jonas Maebe wrote:
> On 31/05/15 17:31, patspiper wrote:
>> I would like to put my custom cross-compiling switches in an inc file
>> which is '#INCLUDed' in my fpc.cfg. The inc file will be in the same
>> folder of fpc.cfg wherever that is. However, #INCLUDE will look in the
>> current directory if no path is specified and will fail to locate the
>> inc file.
> You should do it the other way around: include the default fpc.cfg file
> (which is in a known location, since it's where FPC is installed) in
> your custom configuration file. That way you don't have to modify
> fpc.cfg every time a new fpc release (with a new fpc.cfg file) comes out.
I'll have to specify the location of fpc.cfg everytime I launch fpc. I 
am not sure this solves my issue.
> You can modify the directories where the compiler looks for included
> configuration files using the "#CFGDIR xxx" directive inside
> configuration files.
This can be a good solution. I have just tested it and it worked.

Is it documented anywhere? The online user manual doesn't mention it. 
Google didn't catch it as well.
>   There is no way to specify "the directory where the
> current configuration file is located" though.
Is it possible to have such a feature although it is not crucial anymore?


More information about the fpc-devel mailing list