Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-08

Bug: FPC doesn't perform variable substitution in #INCLUDE-preprocessors

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jetcheng Chu

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