Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-07

CodeCompletion: Unit not found, compile ok

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Lukas Gradl

I've a strange problem with Lazarus (1.3, SVN 45936M):

Im working on a Linux-X64-Workstation but the target of the current project is Win32/i386.

I have a TDBGrid (dbgFolderDocs) on my form.

I can compile the project, it runs correctly.

But while coding when I press the . in the line
for i:=0 to dbgFolderDocs.SelectedRows
an error occurs (it's german, i translated it, so it might be not the exact english error message):
Codetools, Error: 1
dbgrids.pas(37,65) Error: Unit not found: Variants

How can this be - the compiler can find the unit.

Any help appreciated,

Lukas

Reply by email

Lukas Gradl
to Marco van de Voort

Zitat von :

In our previous episode, Lukas Gradl said: > I've a strange problem with Lazarus (1.3, SVN 45936M): Is my guess correct that you also use a trunk version of FPC?

Yes, your guess is correct. I use the latest fpc-svn as well.

regards
Lukas

Reply by email

Mattias Gaertner
to Lukas Gradl: I've a strange problem with Lazarus (1.3, SVN 45936M): Im working on a…
Show quoted text 17 lines
I've a strange problem with Lazarus (1.3, SVN 45936M): Im working on a Linux-X64-Workstation but the target of the current project is Win32/i386. I have a TDBGrid (dbgFolderDocs) on my form. I can compile the project, it runs correctly. But while coding when I press the . in the line for i:=0 to dbgFolderDocs.SelectedRows an error occurs (it's german, i translated it, so it might be not the exact english error message): Codetools, Error: 1 dbgrids.pas(37,65) Error: Unit not found: Variants How can this be - the compiler can find the unit.

Variants is a standard FPC unit.

If compiling works, but the IDE cannot find the unit, it means the IDE cannot find it in the FPC Sources.

Check View / IDE Internals / About IDE:

FPC source directory
Real FPC source directory

Mattias

Reply by email

Lukas Gradl
to Mattias Gaertner

Zitat von Mattias Gaertner :

Show quoted text 22 lines
On Sun, 20 Jul 2014 18:30:57 +0000 Lukas Gradl wrote: > I've a strange problem with Lazarus (1.3, SVN 45936M): > > Im working on a Linux-X64-Workstation but the target of the current > project is Win32/i386. > > I have a TDBGrid (dbgFolderDocs) on my form. > > I can compile the project, it runs correctly. > > But while coding when I press the . in the line > for i:=0 to dbgFolderDocs.SelectedRows > an error occurs (it's german, i translated it, so it might be not the > exact english error message): > Codetools, Error: 1 > dbgrids.pas(37,65) Error: Unit not found: Variants > > How can this be - the compiler can find the unit. Variants is a standard FPC unit.

This was a good hint.

Show quoted text 8 lines
If compiling works, but the IDE cannot find the unit, it means the IDE cannot find it in the FPC Sources. Check View / IDE Internals / About IDE: FPC source directory Real FPC source directory

They were set correctly. But a "Tools / ReRead FPC directory" (again: translated from german) fixed the problem.

Thanks
Lukas

Reply by email

Marco van de Voort
to Lukas Gradl: Zitat von : Yes, your guess is correct. I use the latest fpc-svn as well. regards Lukas
Lukas Gradl wrote 6 lines
> In our previous episode, Lukas Gradl said: >> I've a strange problem with Lazarus (1.3, SVN 45936M): > > Is my guess correct that you also use a trunk version of FPC? Yes, your guess is correct. I use the latest fpc-svn as well.

There variants moved out of the RTL to packages. When I read how you resolved it, probably the old cached index still had it in the RTL dir.

Reply by email

Mattias Gaertner
to Marco van de Voort
Show quoted text 10 lines
On Sun, Jul 20, 2014 at 06:40:30PM +0000, Lukas Gradl wrote: > > In our previous episode, Lukas Gradl said: > >> I've a strange problem with Lazarus (1.3, SVN 45936M): > > > > Is my guess correct that you also use a trunk version of FPC? > > Yes, your guess is correct. I use the latest fpc-svn as well. There variants moved out of the RTL to packages. When I read how you resolved it, probably the old cached index still had it in the RTL dir.

Yes.

Maybe it is possible to detect a svn update in the fpc sources and do the rescan automatically.

Mattias

Reply by email