Recent

Author Topic: Duplicate unit problem when compiling project  (Read 1847 times)

ronhud

  • Jr. Member
  • **
  • Posts: 92
Duplicate unit problem when compiling project
« on: December 23, 2024, 06:18:09 pm »
I have just installed Lazarus version 40rc1.  The ide appears ok but when I try to compile my project I get the following set of messages.   I hope someone can suggest what to do next.




Note: Duplicate unit "componentreg" in "BuildIntf 1.0", ppu="C:\lazarus\lazarus64\components\buildintf\units\x86_64-win64\componentreg.ppu", source="C:\lazarus\lazarus64\components\buildintf\componentreg.pas"
Note: Duplicate unit "componentreg" in "IDEIntf 1.0", ppu="C:\lazarus\lazarus64\components\ideintf\units\x86_64-win64\win32\componentreg.ppu", source="C:\lazarus\lazarus64\components\ideintf\componentreg.pas"

Warning: Recompiling ComponentReg, checksum changed for C:\lazarus\lazarus64\fpc\3.2.2\units\x86_64-win64\rtl\classes.ppu
componentreg.pas(15,61) Error: Can't find unit ComponentReg used by ComponentEditorsWarning: Recompiling ComponentReg, checksum changed for C:\lazarus\lazarus64\fpc\3.2.2\units\x86_64-win64\rtl\classes.ppu
componentreg.pas(15,61) Error: Can't find unit ComponentReg used by ComponentEditors

cdbc

  • Hero Member
  • *****
  • Posts: 1757
    • http://www.cdbc.dk
Re: Duplicate unit problem when compiling project
« Reply #1 on: December 23, 2024, 07:09:29 pm »
Hi
In the dir 'lib' under your project-dir, you'll find 'x86_64-win64' directory, where all you *.ppu & *.o files reside. Try to delete them all and then use 'Build' from the 'run' menu...
That should take care of that...
Regards Benny
« Last Edit: December 23, 2024, 07:11:04 pm by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

ronhud

  • Jr. Member
  • **
  • Posts: 92
Re: Duplicate unit problem when compiling project
« Reply #2 on: December 23, 2024, 07:19:38 pm »
Thanks Benny.   That folder is empty so I tried 'Build' from the 'Run' menu and I got the following message:
componentreg.pas(27,30) Error: Cannot find Laz_AVL_Tree used by ComponentReg of package BuildIntf.

cdbc

  • Hero Member
  • *****
  • Posts: 1757
    • http://www.cdbc.dk
Re: Duplicate unit problem when compiling project
« Reply #3 on: December 23, 2024, 07:59:32 pm »
Hi
Hmmm, I can't remember, if laz_Avl_** is part of 'LazUtils' package, but I think you need to add the package with *_avl_* stuff to your project as a dependency... or at least the path to the unit...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

tetrastes

  • Hero Member
  • *****
  • Posts: 611
Re: Duplicate unit problem when compiling project
« Reply #4 on: December 23, 2024, 10:38:40 pm »
It seems that you did 4.0RC1 installation over a previous one, because componentreg.pas was moved from ideintf in Lazarus 3.x to buildintf in 4.0RC1, but you have this file in both folders.
Make full uninstall of Lazarus and manually delete its folder, if necessary, then install again.

 

TinyPortal © 2005-2018