Recent

Author Topic: "unit1 not found" - comfort of using  (Read 663 times)

Nicole

  • Hero Member
  • *****
  • Posts: 1308
"unit1 not found" - comfort of using
« on: February 19, 2026, 11:35:07 am »
Here is a small annoying, IDE related issue.
Lazarus 4.4.

My user interface is German.
What I know by sure, I translate to English

Do this
- Menu
- Datei (=file? the very left one)
- neue Unit (=new unit)

The new unit opens by the name of "unit1"
- give the unit your own name, let us say "unit_test"
- save the unit and accept the suggestion of unit_test.pas as name

Try to compile.
==> Will not work.

REASON:
The myproject.lpr has saved "Unit1" and cannot find it any more.

==> just delete the word ",unit1" and everything works fine.

This small thing is not much to work around, but somehow not necessary in such a gorgous software as Lazarus.

Not to forget:
A warm thank you to all developers for your great work!

Zvoni

  • Hero Member
  • *****
  • Posts: 3303
Re: "unit1 not found" - comfort of using
« Reply #1 on: February 19, 2026, 12:16:52 pm »
In Project-Options....
Uncheck the yellow one in the Screenshot
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

dseligo

  • Hero Member
  • *****
  • Posts: 1672
Re: "unit1 not found" - comfort of using
« Reply #2 on: February 19, 2026, 12:19:39 pm »
The new unit opens by the name of "unit1"
- give the unit your own name, let us say "unit_test"
- save the unit and accept the suggestion of unit_test.pas as name

You are correct.
Other way to avoid this problem is:
1. save new unit and in the dialog change 'unit1' to your desired name
2. Lazarus will change unit name

Zvoni

  • Hero Member
  • *****
  • Posts: 3303
Re: "unit1 not found" - comfort of using
« Reply #3 on: February 19, 2026, 12:31:53 pm »
The new unit opens by the name of "unit1"
- give the unit your own name, let us say "unit_test"
- save the unit and accept the suggestion of unit_test.pas as name

You are correct.
Other way to avoid this problem is:
1. save new unit and in the dialog change 'unit1' to your desired name
2. Lazarus will change unit name
Or just uncheck it in Project-Options
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Nicole

  • Hero Member
  • *****
  • Posts: 1308
Re: "unit1 not found" - comfort of using
« Reply #4 on: February 27, 2026, 05:16:40 pm »
Thank you for your replis!
I follow Zvonis suggestion. Not sure, if I can remember Dsligos idea in several months, although I like it much.

 

TinyPortal © 2005-2018