Hello,
The --unit-path option does not work (or maybe I don't know, how it works). The following program "mainprog" uses a unit in directory ..\test-units. I tried:
gpc --unit-path ..\test\units mainprog.pas
where mainprog.pas was:
program mainprog;
uses gpc, unit1;
begin unitvar := 'Test ok'; writeln (unitvar); end.
The compiler complained that it could not compile "unit1". Then I tried:
gpc --autobuild mainprog.pas
where mainprog.pas was:
program mainprog;
uses gpc, unit1 in '..\test-units\unit1.pas';
begin unitvar := 'Test ok'; writeln (unitvar); end.
This worked, but I don't like to put pathnames into source code. Is there a better way to do compilations with units in different directories?
Best regards, Peter Dietrich --------------------
GPC-Version (gpc -v):
Reading specs from C:\usr\local\lib\gcc-lib\i386-mingw32\2.8.1\specs gpc version 19990118, based on gcc-2.8.1
System-Version:
Windows NT 4.0 on i386
________________________________________________________________________________________
This communication contains information which may be confidential. It is for the exclusive use of the intended recipient. If you are not the intended recipient, please note that any distribution, copying or use of this communication or the information in it is prohibited. If you have received this communication in error, please notify us by email or by telephone on ++49 6151 989 0 and then delete the email and any copies of it.
pdietrich@synstar.de wrote:
gpc --unit-path ..\test\units mainprog.pas
Did you also try this?
gpc --unit-path ../test/units mainprog.pas
Normally, GPC should compensate for different dir separator symbols, but according to Murphy ...
Peter