Re: [Lazarus] [Lazarusdev] CodeTools FPC not defined problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: [Lazarus] [Lazarusdev] CodeTools FPC not defined problem

Free Pascal - Lazarus mailing list
Some more info on my own mail, which I mistakenly only send to Ondrej:

Op 13-06-17 om 23:50 schreef Joost van der Sluis:

> Op 13-06-17 om 23:22 schreef Ondrej Pokorny:
>> Joost reported in the Lazarus mailing list today that CodeTools
>> probably miss the FPC define due to an unknown reason and therefore
>> the out parameter isn't parsed properly. I wasn't able to help him.
>> Could you take a look?
> I can give some more information. The content of hints, warnings and
> errors are not shown in the messages-screen. I thought it was unrelated.
> But I think it's related.
> My guess is that the defines are parsed from the compiler-output (-va)
> But that the compiler-output is not parsed right.
> I'm fiddling around in etFPCMsgParser. At first sight I see that the
> parser looks for 'Warn:' while my compiler outputs: 'Warning:'. But
> that's not the main issue.
> I did not debug the code, only looked briefly. But what I do see is that
> for some strange reason the compiler-output adds some extra characters.
> This is an example-output from trunk:
> Free Pascal Compiler version 3.1.1 [2017/06/13] for x86_64
> Copyright (c) 1993-2017 by Florian Klaempfl and others
> Target OS: Linux for x86-64^@
> Compiling unit1.pas^@
> unit1.pas(8,22) Fatal:^@ Can't find unit FileUtil used by Unit1^@
> Fatal:^@ Compilation aborted^@
> Maybe that the ^@ (tab?) character is messing things up? I don't see
> this character in fpc 3.0.0's output.
> I'll dig further tomorrow.

The ^@-character actually is #0. The parsing is done using pchar's,
which are cut-off at the #0 sign.

I think I'll have to find out why the compiler outputs #0 characters in
the middle of strings....


Lazarus mailing list
[hidden email]