[fpc-pascal] Bug: FPC doesn't perform variable substitution in #INCLUDE-preprocessors

Jetcheng Chu jcchu at acm.org
Sat Aug 7 13:28:48 CEST 2010

Hi all,

Since the bug reporting system keeps rejecting my login, I'm posting
here about this bug.

I want to have per-project configuration files yet still let the global
one processed first.  With the #INCLUDE preprocessor, I can load
hardcoded configuration files, but not if the pathname contains
variables like $FPCTARGET.

For example, with the a local configuration file containing solely

'#INCLUDE C:\FPC\bin\$FPCTARGET\fpc.cfg',

the compiler reports

'Fatal: Unable to open file C:\FPC\2.4.0\bin\i386-win32\fpc.cfg'.

Note the variable _is_ substituted in the error message.

Any suggestions or workarounds are welcome.

Best Regards,
Jetcheng Chu

More information about the fpc-pascal mailing list