Jonas Maebe wrote 13 lines
Martin Schreiber wrote:
>
http://www.freepascal.org/docs-html/current/user/usersu7.html#x21-280003.
>1.2 states:
> "
> You can add a directory to the unit search path with the (-Fu (see page
> 100)) option. Every occurrence of one of these options will insert a
> directory to the unit search path. i.e. the last path on the command line
> will be searched first.
> "
> Does this still apply?
From looking at the compiler code: yes.
I made a test.
in ./:
"
program conssoletest;
uses
testunit;
begin
testunit0();
end.
"
in ./test:
"
unit testunit;
interface
procedure testunit0();
implementation
procedure testunit0();
begin
end;
end.
"
in ./test1:
"
unit testunit;
interface
procedure testunit1();
implementation
procedure testunit1();
begin
end;
end.
"
"
fpc -oconssoletest -Fu./test -Fu./test1
conssoletest.pas
Free Pascal Compiler version 3.0.0rc2 [2015/10/14] for i386 Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for i386
Compiling conssoletest.pas
Compiling ./test/testunit.pas
Linking conssoletest
/usr/bin/ld: warning: link.res contains output sections; did you forget -T? 14 lines compiled, 0.2 sec
"
"
fpc -oconssoletest -Fu./test1 -Fu./test
conssoletest.pas
Free Pascal Compiler version 3.0.0rc2 [2015/10/14] for i386 Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for i386
Compiling conssoletest.pas
Compiling ./test1/testunit.pas
conssoletest.pas(5,2) Error: Identifier not found "testunit0" conssoletest.pas(7) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode
"
Martin