It seems you’re trying to use a really ancient Castle Game Engine 6.4 version, which results in error Error: Duplicate identifier “PT” – this comes from change in latest FPC versions, for which the engine 6.4 is not ready.
This possibly happened because you used OPM (Online Package Manager) to install CGE, which indeed includes now engine version 6.4 (confirmed by looking at https://packages.lazarus-ide.org/ , it shows CGE version 6.4). We really, really should contact OPM managers to update Castle Game Engine definition there, so that OPM links to latest engine version:
-
either 7.0-alpha.3, latest “stable”,
-
or just get code from
snapshotbranch of our GitHub repository, which is now at7.0-alpha.3.snapshot. This is the same thing as available in GitHub downloads and downloads on our webpage.
I realize that our “funny” version number, “7.0-alpha.3”, doesn’t help in our communication
Despite the “alpha” word in version name, it is the closest thing we have to “latest stable release”, and definitely more recommended than ancient 6.4. See also my recent answer about it in this thread. Any help with this is most welcome – if anyone wants to take care of updating OPM definition to link to latest stable, I’ll appreciate it. You can link to this forum post, and to that one, and of course I’m happy to help.
The trivial solution right now: Don’t use CGE from OPM. Download Castle Game Engine from our downloads. Use “Register Lazarus Packages” button as documented here: Lazarus | Manual | Castle Game Engine . And make sure you don’t have any leftover old engine versions on disk, to not confuse you
Building examples using Lazarus should work flawlessly then (it is automatically checked, so I’m certain it works
). Note that even package names have changed, we have packages like castle_engine_base, castle_engine_window (not castle_base, castle_window), see here for announcement.