Sign in Join

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

Mailing lists / lazarus / 2009-06

IDE not building .lrs files

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Bruce Tulloch

I have a project (ported from Delphi) with some forms in which the IDE form designer does not rebuild (or create in the first place) the .lrs files when the .lfm file is modified. Manually building them with lazres works fine but the IDE seems to either (silently) fail to rebuild them or not even try to build them.

Has anyone else seen this sort of problem?

Thx, Bruce.

Reply by email

Mattias Gaertner
to Bruce Tulloch
Show quoted text 7 lines
I have a project (ported from Delphi) with some forms in which the IDE form designer does not rebuild (or create in the first place) the .lrs files when the .lfm file is modified. Manually building them with lazres works fine but the IDE seems to either (silently) fail to rebuild them or not even try to build them. Has anyone else seen this sort of problem?

No.

The IDE rebuilds lrs files on saving the project, which for example is done before compiling. It checks the file date of all units listed in the project inspector. Maybe you forgot to add the unit to the project?
If the .lrs file does not exist, the .lrs file is created in the unit output directory of the project. Maybe you were looking in the wrong place?

The IDE does not yet auto create lrs for packages.

Mattias

Reply by email

Bruce Tulloch
to Mattias Gaertner
Mattias Gaertner wrote
Maybe you were looking in the wrong place?

Thanks Mattias, that seems to be the problem.

The .lrs file was indeed being created in the project's output directory.

Adding this directory to the include path fixed the problem for this project.

Why is it necessary to specify this directory in the include path as well?

Presumably if the IDE puts the lrs file in the output directory it should already know to look there when it needs lrs files without having to specify the same directory in the include path explicitly. Or am I misunderstanding something here?

Bruce

Reply by email

Mattias Gaertner
to Bruce Tulloch
Show quoted text 10 lines
Mattias Gaertner wrote: > Maybe you were looking in the wrong place? Thanks Mattias, that seems to be the problem. The .lrs file was indeed being created in the project's output directory. Adding this directory to the include path fixed the problem for this project.

Normally, the IDE adds $(ProjOutDir)/ to the include path, when the option is enabled (Project / Project Options / Misc / Save .lrs files in project output directory).

Maybe you deleted it accidentally?

Why is it necessary to specify this directory in the include path as well?

You can create a feature request in the bug tracker to add this hidden.

Presumably if the IDE puts the lrs file in the output directory it should already know to look there when it needs lrs files without having to specify the same directory in the include path explicitly. Or am I misunderstanding something here?

The IDE knows. But the compiler must know too.

Mattias

Reply by email

Bruce Tulloch
to Mattias Gaertner
Mattias Gaertner wrote 8 lines
On Mon, 22 Jun 2009 11:35:12 +1000 Bruce Tulloch wrote: > Why is it necessary to specify this directory in the include path as > well? > You can create a feature request in the bug tracker to add this hidden.

No need to change it, now that I understand how it works it makes sense to leave it as is.

Thanks for the explanation Mattias.

Bruce

Reply by email