[fpc-pascal] fpc in symlinked directory

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Mar 26 16:53:29 CET 2014


Here is a summarize so far:

When the compiler is started in a directory with a symlink, the
directory is resolved and used for error messages and debug info.
All other directories are not resolved.
If you want fpc to use only unresolved paths, you can start fpc in
a directory without sources. But this requires adapting all relative
paths, which can not be done automatically in general.

GetCurrentDir always returns the resolved physical file name.

Mattias


On Tue, 25 Mar 2014 19:14:17 +0100
Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:

> Hi,
> 
> When I start fpc in a directory containing symlinks the compiler uses
> the resolved directory, leading to wrong source file names.
> For example:
> 
> /tmp/orig/project1.pas
> /tmp/link -> /tmp/orig
> 
> cd /tmp/link
> fpc -vb project1.pas
> /tmp/orig/project1.pas(6,5) Error: Identifier not found "w"
> 
> Is there a workaround?
> For example a way to tell fpc to use the PWD environment
> variable?
> 
> Mattias
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list