Forum > Editor

code completion and navig. problem in pascal code Lazarus 2.0.12+dfsg-1 kubuntu



In my office, I work with Delphi (windows os) for several years. Just installed Lazarus the day before yesterday.

I use Kubuntu 21.10 with cinnamon desktop.

When editing code, the code completion fails very often, it does not find most of the classes in my project and in the packages, that I use (e.g. indilaz)...

If I ctrl-click on a type to find its delclaration, it just jumps to an error position in that file (but there is no error, the project can be compiled and executed but Codetools shows the error: unit not found)...
If I press shift-space after an instance and a dot like "button1." (where I want to select "button1.caption"), nothing happens or sometimes again, the unit not be found problem and the carret jumps to the unknown unit position... 

How is it possible, that the code can be compiled and executed nicely but Codetools finds problems with the code? so the compiler understands it, but the editor does not?

Did I configure anything wrong? is there a way to make the unit name known to Codetools?


Hello Alrounder,
Welcome to the forum.

I rarely use Indy but last time I used it, it was working correctly.

How did you install the Indy? Did you use Online Package Manager?
Lazarus main menu > Package > Online Package Manager

What you said sounds very bad. Perhaps you need to reinstall the Lazarus and the package.

I installed it with the online package manager and I installed lazarus with synaptics.

You installed from Synaptic or through apt-get from the Distro-Repo

Remove everything, download the deb's from here, and install from local (e.g. using gdebi), or use fpcupdeluxe, or download sources from here, and compile yourself.
Should be enough How-To's on the wiki

EDIT: Just saw your post.
IIRC, Ubuntu (Debian) borked their deb's for Lazarus, with many units/packages missing

I have fixed it like this:

in the uses, I have corrected the name of the unit from IdFtp to IdFTP... and now, code-completion works!

The unit names are case-sensitive!
as the filenames in linux os all are... as I already said: I come from Delphi on Windows... ;-) 

A warning for this would be nice...


[0] Message Index

Go to full version