Wrong unit search path order
Original Reporter info from Mantis: mse
-
Reporter name: Martin Schreiber
Original Reporter info from Mantis: mse
- Reporter name: Martin Schreiber
Description:
FPC uses the first found unit in -Fu commandline items instead of the last.
Steps to reproduce:
Compile attached project:
"
mse@linuxmse:/proj/msegui/testcase/fpc/fixes_3_0/searchorder> fpc -Fu./test -Fu./test1 searchorder/proj/msegui/testcase/fpc/fixes_3_0/searchorder> fpc -Fu./test1 -Fu./test searchorder
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 searchorder.pas
Compiling ./test/testunit.pas
Linking searchorder
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
14 lines compiled, 0.3 sec
"
mse@linuxmse:
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 searchorder.pas
Compiling ./test1/testunit.pas
searchorder.pas(5,2) Error: Identifier not found "testunit0"
searchorder.pas(7) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode
"
Mantis conversion info:
- Mantis ID: 30053
- OS: Linux
- Platform: x86
- Version: 3.0.0
- Fixed in version: 3.1.1
- Fixed in revision: 1359 (#5e668176)
- Target version: 3.0.2