Sign in Join

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

Mailing lists / lazarus / 2015-02

Weird behavior of IDE (no executable produced)

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Valdas Jankūnas

Hello,

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>;
- 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.

Should I report a bug that order of units in <Units> section of .lpi file matters?

Sorry for my bad English.

Valdas Jank?nas

Reply by email

Mattias Gaertner
to Valdas Jankūnas
Show quoted text 19 lines
Hello, 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;

Correct.

- 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?

No.
The only documentation about the lpi file format is the IDE source itself. The MainUnit value exists since the beginning.

Mattias

Reply by email

Valdas Jankūnas
to Mattias Gaertner

2015.02.21 18:18, Mattias Gaertner ra??:

Show quoted text 19 lines
> - 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 > - 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? No. The only documentation about the lpi file format is the IDE source itself. The MainUnit value exists since the beginning.

Thanks for info.

When similar "bug" happens then I will know where to look for the Cure :)

Valdas Jank?nas

Reply by email