Sign in Join

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

Mailing lists / lazarus / 2010-04

Adding a Form to the (Lazarus) IDE

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Flávio Etrusco

Hello all,
what's the recommended steps while adding a new form to Lazarus? I couldn't find anything related on the wiki.
Also, I was trying to add a form to Lazarus and I was getting the following error:

Compiling lazarus.pp
Compiling /home/etrusco/Projects/lazarus/debugger/debugger.pp
debugger.pp(32,6) Error: Illegal unit name: Debugger
debugger.pp(1428,1) Fatal: There were 1 errors compiling module, stopping

Context: at first (after creating the form and changing code to use it, etc) the IDE was compiling fine. For some other (and unknown) reason I lost the new files, and when I created new ones I started getting this error. I tried cleaning intermediary files, checked unit names, checked that project files weren't modified, and couldn't find any suspect. Then, out of a sudden the error disappeared (In the meantime I removed references to the new file, renamed the file, then renamed it back and restored the reference). Any ideas/explanations?

Best regards,
Fl?vio

Reply by email

Mattias Gaertner
to Flávio Etrusco
Hello all, what's the recommended steps while adding a new form to Lazarus? I couldn't find anything related on the wiki.

It depends on what form where.
For the IDE you can use the ide/lazarus.lpi and create a new unit/form.

Show quoted text 6 lines
Also, I was trying to add a form to Lazarus and I was getting the following error: Compiling lazarus.pp Compiling /home/etrusco/Projects/lazarus/debugger/debugger.pp debugger.pp(32,6) Error: Illegal unit name: Debugger

It can mean you renamed a unit, but forget to clean up the old ppus.

Show quoted text 10 lines
debugger.pp(1428,1) Fatal: There were 1 errors compiling module, stopping Context: at first (after creating the form and changing code to use it, etc) the IDE was compiling fine. For some other (and unknown) reason I lost the new files, and when I created new ones I started getting this error. I tried cleaning intermediary files, checked unit names, checked that project files weren't modified, and couldn't find any suspect. Then, out of a sudden the error disappeared (In the meantime I removed references to the new file, renamed the file, then renamed it back and restored the reference). Any ideas/explanations?

The compiler does not delete old ppu files, if the source vanished. Combined with a special rename this can lead to the above error. That's why the IDE auto deletes ppu files when renaming. But since the references in the other ppu files are still there, it would be better if the IDE deletes all related ppu files.

Mattias

Reply by email

Flávio Etrusco
to Mattias Gaertner
Show quoted text 5 lines
> what's the recommended steps while adding a new form to Lazarus? I > couldn't find anything related on the wiki. It depends on what form where. For the IDE you can use the ide/lazarus.lpi and create a new unit/form.

Ok, thanks, I was thinking of some "allunits" unit to help 'make'. Indeed I hadn't find any such thing for 'debugoutputform.pp', so this is a relief ;-)
The form is a debugger helper form, in 'debugger' folder. It was initially added to the lazarus.lpi since I used the New Unit command. But I thinking again removing it from the the .lpi and lazarus.pp was one thing that I did when 'make' (and 'Build Lazarus') started to give errors, and maybe it helped?

Show quoted text 8 lines
> Also, I was trying to add a form to Lazarus and I was getting the > following error: > > Compiling lazarus.pp > Compiling /home/etrusco/Projects/lazarus/debugger/debugger.pp > debugger.pp(32,6) Error: Illegal unit name: Debugger It can mean you renamed a unit, but forget to clean up the old ppus.

No renamed units. The only minimally suspect thing I did was to copy the license header from debugoutputform.pp.

Show quoted text 5 lines
The compiler does not delete old ppu files, if the source vanished. Combined with a special rename this can lead to the above error. That's why the IDE auto deletes ppu files when renaming. But since the references in the other ppu files are still there, it would be better if the IDE deletes all related ppu files.

Thanks for the tips, but I searched and deleted the files - and confirmed - with 'rm $(find)'...

Best regards,
Fl?vio

Reply by email