[Lazarus] Codetools in distress

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Jun 14 10:09:19 CEST 2017


On Tue, 13 Jun 2017 23:05:03 +0200
Joost van der Sluis via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

> Op 13-06-17 om 19:08 schreef Joost van der Sluis via Lazarus:
> > On 06/13/2017 04:07 PM, Ondrej Pokorny via Lazarus wrote:  
> 
> > ### TCodeToolManager.HandleException: [20170421195425] "expected :, but 
> > AResult found" at Line=111 Col=43 in 
> > "/home/CNOC/joost/svn/fpc-trunk/packages/rtl-objpas/src/inc/variants.pp"  
> 
> > Any idea where to look?  
> 
> Seems like Lazarus has a compilermode-flag cmsOut, to indicate that a 
> compiler supports out-parameters.

This corresponds to the {$modeswitch out}.

> This flag is not set.
> 
> At a closer look, the variants.pp unit starts with:
> 
> {$IFDEF FPC}
> {$MODE objfpc}
> {$H+}
> {$ENDIF}
> 
> But when showed in Lazarus, {$MODE objfpc} is grayed out. So Lazarus 
> does not detect that FPC is defined...
> 
> In the defines-editor, I do see the FPC-define, but I don't see any 
> value. Is that normal?

No. The macro FPC comes from reading the compiler output.
Try main menu 
Tools / Rescan FPC Source Directory
to reread the compiler output.
 
> Any clue why 'fpc' is not defined according to the codetools?

Open unit variants in source editor.
Main menu / Source / Unit information / Show Codetools defines
In "Values" you should see a lot of defines, like VER3_1_1 and FPC.


Mattias


More information about the Lazarus mailing list