[fpc-devel] one compiler verbosity wish
ppkk at mail.ru
Thu Apr 6 18:28:35 CEST 2006
Even with "-va" switch I can't find a clue in the following situation (you may substitute other units and function):
begin DeleteFile(B); end.
I get "Incompatible types...PChar expected".
The reason is in the windows unit.
But first guess was that there is an error in sysutils documentation.
It would be great, if in verbose mode (or even in several others) I could read something like
"Incompatible type for windows.deletefile...PChar expected".
"Hint: Found...DeleteFile(PChar)...in windows"
Without windows unit program works fine with sysutils.DeleteFile(const a:string) function.
meaningful part of log is (it's the file from the beginning of my message with few extra CarriageReturns):
(A) Load from A (implementation) unit WINDOWS
1.pp(5,1) (A) Parsing implementation of 1.pp
1.pp(8,17) Error: Incompatible type for arg no. 1: Got "ShortString", expected "PChar"
Hint: Found declaration: DeleteFile(PChar):LongBool
1.pp(9,4) Fatal: There were 1 errors compiling module, stopping
I get Hint about "wrong" declaration, but don't get it's origin. I read about loading (but what?) from windows.
My first guess was that there is an error in sysutils documentation.
More information about the fpc-devel