Sign in Join

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

Mailing lists / fpc-pascal / 2009-07

Environment Variables with Include Directive

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Andrew Brunner

I've got a situation where I'm wanting to concatenate a path from the environment with a string to specify the path to the actual file to include when building.

PATH_TO_DATA_INCLUDES = '/mnt/Source/Includes/Data/

{$i %PATH_TO_DATA_INCLUDES%+definitions.inc}

Is there any way to get FPC to join the two entries together to create a single include reference?

Thanks

Jonas Maebe
to Andrew Brunner
Andrew Brunner wrote 10 lines
I've got a situation where I'm wanting to concatenate a path from the environment with a string to specify the path to the actual file to include when building. PATH_TO_DATA_INCLUDES = '/mnt/Source/Includes/Data/ {$i %PATH_TO_DATA_INCLUDES%+definitions.inc} Is there any way to get FPC to join the two entries together to create a single include reference?

No. Although not identical, you can use the -
Fi"$PATH_TO_DATA_INCLUDES" command line parameter to add that directory to the include files search path.

Jonas