I have the following demo code --
program Demo_10a;
uses
windows in 'D:\Lazarus_32bit_2.0.x\fpc\3.0.4\source\rtl\win32\windows.pp';
begin
writeln('Debug_str = ', Debug_str); // Debug_str is declared in windows.pp
readln;
end.
In windows.pp I try to induce a deliberate compiler error just to make sure that windows.pp is indeed being compiled --
unit windows;
Induce deliberate compiler failure here !!!
// Remainder of windows unit follows ...
When I build, Lazarus should produce an error when it comes to the line "Induce deliberate compiler failure here !!!". However, the compiler seems to bypass windows.pp and instead causes an error in the main program -- "Demo_10a.PAS(10,25) Error: Identifier not found "Debug_str".
However, if I copy windows.pp to the folder where Demo_10a is located then a compiler error is produced, as expected -- "windows.pp(16,1) Fatal: Syntax error, "INTERFACE" expected but "identifier INDUCE" found". This makes me think that something is wrong with the statement "uses windows in 'D:\Lazarus_32bit_2.0.x\fpc\3.0.4\source\rtl\win32\windows.pp';". However, if this statement isn't correct then why doesn't the compiler give an error at that point, something like "windows unit not found"? (There is a windows.ppu in "D:\Lazarus_32bit_2.0.x\fpc\3.0.4\units\i386-win32\rtl\" so perhaps the compiler is using that instead. However, that file doesn't have the current date.)
Lazarus 1.6.4
FPC 3.0.2
Windows 10 Pro
Thanks,
Don C.