Error compilling CGE Editor on Windows 11

Now I’m on Windows 11 trying to re-compile the editor (version 7.0-alpha3.snapshot) with custom components but it ends with this error (and a few related more):

C:\prog\motores\CastleGameEngine\tools\common-code\toolmanifest.pas(144,29) Error: (5000) Identifier not found “TProjectDependencies”

I’m using FPC 3.2.2 and Lazarus 3.4. On Linux I’m using FPC 3.2.0 and Lazarus 3.4 and it compiles without error but a few warnings.

I was about to upgrade Lazarus but the site is down right now.

It seems you have multiple engine versions, old and new, and they get mixed up.

( This issue seems unrelated to Windows, FPC, Lazarus versions. )

In new CGE version,

  1. TProjectDependencies is defined in src/files/castleinternaltools.pas ( castle-engine/src/files/castleinternaltools.pas at master · castle-engine/castle-engine · GitHub ).
  2. And it is used by tools/common-code/toolmanifest.pas ( castle-engine/tools/common-code/toolmanifest.pas at master · castle-engine/castle-engine · GitHub ).

It seems in your case AD 2 is true, but AD 1 is not.

Likely, Lazarus remembers the package (lpk) location from older CGE.

Make sure to recompile lpk (from new CGE) using Lazarus first. Our Compiling from source | Manual | Castle Game Engine shows various ways that avoid this issue:

  • if you build the “build tool” from Lazarus, then before castle-engine/tools/build-tool/castle-engine.lpi rebuild packages/castle_base.lpk .
  • or there are other ways of building the “build tool”.

Actually I actualized CGE but I didn’t remove the old version.

Maybe the best option is to uninstall, clean and install it again.

Thanks.

Hm, you generally do not need to uninstall previous engine version if you “update in place”. Our Windows installer (if you download binaries from Download | Castle Game Engine ) has been specifically tested to ensure smooth upgrades (without the need to uninstall old version first).

Maybe there’s something we should fix – can you describe in more details

  • how did you install CGE originally? I can see that old version (known to Lazarus) is in C:\prog\motores\CastleGameEngine .
  • how did you update CGE?

Your messages did indicate you had 2 versions of CGE sources, one old (C:\prog\motores\CastleGameEngine) and one new.

( I understand you solved the issue anyway on your system. But in any case more info would be appreciated – we want to ensure “smooth upgrades” for people, without the need to uninstall. So if there’s some bug there, I’d like to fix it :slight_smile: )

Sorry for the late answer. It’s a busy month.

  • how did you install CGE originally?

I don’t remember actually. I think I downloaded a zip or a tarball and unzipped.

  • how did you update CGE?

I downloaded the installer from the site and installed over it.

[Edit]
I’ve fixed this way:

  1. I’ve uninstalled CGE.
  2. I’ve removed the CGE directory because it had some files.
  3. I’ve removed CGE configuration files from C:/Users/<user>/AppData/Local
  4. I’ve installed CGE again.
  5. I’ve registered packages on Lazarus again.

This seems to work for me.