Recent

Author Topic: Open Loaded Package -> Compile -> Cannot find Forms used by...  (Read 5037 times)

petif

  • Newbie
  • Posts: 5
Open Loaded Package -> Compile -> Cannot find Forms used by...
« on: January 25, 2015, 11:28:45 am »
Hi All,

I have been working with Delphi for decades but I am just a new-comer in Lazarus. I have just started to use Lazarus 1.2.6/FPC 2.6.4 (in Windows Vista op. system) and immediately faced a problem I have not been able to solve yet.

I created a new package with a new component that is a TListView descencant. I had not modified anything just installed the package. Lazarus IDE was recompiled successfully and I can see the new component on the palette.

Then I clicked on "Open Loaded Package" and tried to recompile the package:

upfobjectlistview.pas(8,34) Fatal: Can not find Forms used by UPFObjectListView, ppu=C:\lazarus\lcl\units\i386-win32\forms.ppu, package LCLBase

Note: all my source code saved in c:\Project\Shared folder.

I have no idea what to do. If anybody could help me I would appreciate that. Please let me know if you need more information.

Cheers.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Open Loaded Package -> Compile -> Cannot find Forms used by...
« Reply #1 on: January 25, 2015, 01:23:25 pm »
This kind of problem can have multiple causes, but here are some things to try.
Search your default drive (c: presumably) for forms.ppu
There should be only one, in the c:\lazarus\lcl\units\i386-win32\ directory
Are there any others? If there are, delete any you find, and try to determine how they came to be there. Perhaps you need to do a clean out, delete some old directories and reinstall Lazarus?

There may be a legitimate need for you to have included Forms in the uses clause of upfobjectlistview.pas. However, it may be unnecessary to have Forms there (a plain vanilla TListView descendant would need only Classes and ComCtrls). If it is un-needed, then it is just possible that removing it from the uses clause might cure the problem.

petif

  • Newbie
  • Posts: 5
Re: Open Loaded Package -> Compile -> Cannot find Forms used by...
« Reply #2 on: January 26, 2015, 03:30:21 pm »
Thank you very much for your reply. I will check out the things you said and report back to you.

PS.: We are talking about a brand new Lazarus installation. I have not touched anything. I have been struggling with this problem for a long time that is why I decided to create a clean installation.

Laksen

  • Hero Member
  • *****
  • Posts: 724
    • J-Software
Re: Open Loaded Package -> Compile -> Cannot find Forms used by...
« Reply #3 on: January 26, 2015, 05:52:55 pm »
Have you changed the destination target (cpu or os) of the project you had open when you recompiled?

petif

  • Newbie
  • Posts: 5
Re: Open Loaded Package -> Compile -> Cannot find Forms used by...
« Reply #4 on: January 26, 2015, 06:40:18 pm »
No, I have not changed any settings anywhere, I did not put a program line in the unit. Factory defaults everywhere.

petif

  • Newbie
  • Posts: 5
Re: Open Loaded Package -> Compile -> Cannot find Forms used by...
« Reply #5 on: January 26, 2015, 09:29:27 pm »
I have just checked what HowardPC said:

- Brand new installation. This time I have not even installed lazarus-1.2.6-fpc-2.6.4-cross-x86_64-win64-win32.exe.

- Only one Forms.ppu exists c:\lazarus\lcl\units\i386-win32\

ttestlistview.pas(8,34) Fatal: Can not find Forms used by ttestlistview, ppu=C:\lazarus\lcl\units\i386-win32\forms.ppu, package LCLBase

- If I remove Forms unit the following error occurs:

menus.pp(451,3) Fatal: Can not find unit Forms used by Menus. Check search path package LCLBase, try a clean rebuild, check implementation uses sections.

It is very disappointing.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Open Loaded Package -> Compile -> Cannot find Forms used by...
« Reply #6 on: January 26, 2015, 09:49:58 pm »
is your package "depends on LCL" package or do you just set the search path to LCL in the package compiler options?
If the second, then it's a problem.

petif

  • Newbie
  • Posts: 5
Re: Open Loaded Package -> Compile -> Cannot find Forms used by...
« Reply #7 on: February 01, 2015, 05:32:57 pm »
Hi All,

First and foremost thank you very much for helping me with this issue. After spending a couple of more days finally I realized what was the problem.

It turned out that it works properly on my machine at the office where I work but I was not able to create a new component at home. It was strange. So I installed Lazarus directly on my laptop and it worked properly. Then what was the difference between the laptop version and the one I used in the virtual machine? I took apart my entire project and I started to put it together step by step.

Brace yourself! I used to have a file "CURSORS.LRS" in my C:\Project\Shared folder and it collided with another existing Lazarus file: C:\lazarus\lcl\cursors.lrs. I could have figured it out earlier if the compiler error message gave me more precise description such as duplicated resource file or something like that. Instead this was the message:
"Fatal: Can not find Forms used by UPFObjListView, rem ppu=C:\lazarus\lcl\units\i386-win32\forms.ppu, package LCLBase"

It took a long time to solve this problem but I hope it is worth to share this information with you and you won't make the same mistake that I did.

May the force be with you.

 

TinyPortal © 2005-2018