[Lazarus] How do I tell codetools to use implicitly loaded unit for code complesion?
Michael Ring
mail at michael-ring.org
Sat Jul 5 17:03:55 CEST 2014
On embedded targets a unit with the definition of the target (Registers,
Interrupts, etc..) is implicitly loaded when fpc compiles the code.
Because of this Codetools does not seem to know about the definitions
inside of this specific unit and code completion does not work.
When I implicitly add the unit to the uses line of my program then code
completion works just fine but I cannot compile the code because I get a
'Duplicate identifier' error because the unit is first implicitly loaded
and then loaded again because it is part of uses
Is there a way that I can give a hint to codetools to also use this unit
for code competion?
Thank you,
Michael
Example:
program hello;
uses
pic32mx795f512h;
gives me code completion for all definitions made in pic32mx795f512h,
but when I compile the program I get the following error:
Compile Project: Exit code 1, Errors:2, Hints:1
hello.pas(3,18) Error: Duplicate identifier "PIC32MX795F512H"
hello.pas(3,18) Error: Duplicate identifier "PIC32MX795F512H"
hello.pas(3,18) Hint: Identifier already defined in unit HELLO at line 2
More information about the Lazarus
mailing list