[Lazarus] Weird behavior of IDE (no executable produced)
nc-gaertnma at netcologne.de
Sat Feb 21 17:18:28 CET 2015
On Sat, 21 Feb 2015 14:42:49 +0200
Valdas Jankūnas <zmuogs at gmail.com> wrote:
> today I found a weird bug (?): if project's .lpr file is not in
> "Unit0" section of .lpi file, then IDE fails to produce executable
> without complaining.
> I found this by opening old (~2 month) project with new (svn1.5)
> Lazarus: "Files" in ProjectInspector becomes empty (also as "Required
> Packages"), so I readded my project files and .lpr comes last. And then
> after compiling no executable is produced.
> I tested with lazarus v1.2.6 and svn1.5(r47935) with fpc v2.6.4 on
> Linux 64bit.
> Steps to reproduce:
> - start lazarus and create clean project of graphical Application;
> - save project and close Lazarus;
> - open project's .lpi file in editor and swap content of <Unit0> and
> <Unit1> sections -> <Filename Value="project1.lpr"/> goes in to <Unit1>;
Then you have to change
General/MainUnit/Value to 1
> - save file and open that project in Lazarus;
> - Lazarus complains about "The project does not use the LCL unit
> interfaces, ...", you can add "interfaces" or ignore - no matter;
> - compile project (ctrl + F9) -> message "Compile Project, Target:
> project1: Tvarka" (done) appears;
> - now try find produced executable - there is none.
No, because the compiler compiled unit0.
> Should I report a bug that order of units in <Units> section of .lpi
> file matters?
The only documentation about the lpi file format is the IDE source
itself. The MainUnit value exists since the beginning.
More information about the Lazarus