Good day!
I try to compile my project in another computer (to be exact, i temporally worked on another machine and now back to my usual workplace). When i do it from CGE editor it work nice. But when i trying to run project from Lazarus IDE, i got problem in castleutils_struct_list unit:
type
{ List of structures.
This is just TList class from Generics.Collections, with some useful helpers. }
{$ifdef CASTLE_OBJFPC}generic{$endif}
TStructList<T> = class({$ifdef CASTLE_OBJFPC}specialize{$endif} TList<T>)
public
type
PT = ^T;
TTypeList = array [0 .. {$ifdef FPC} MaxInt div SizeOf(T) - 1 {$else} 1000 * 1000 {$endif}] of T;
PTypeList = ^TTypeList;
I see that error first time, and i remember, recently this code compiled from Lazarus fine. I think, problems started, when i move program to another computer.
I have a faint memory something like that happened to me before. I don’t remember how exactly I’ve fixed that but two things that may be useful to try:
Rebuild the project clean from Lazarus (Run → Clean Up and Build…). If this helps, then this most likely was caused by upgrading CGE and Lazarus still keeping obsolete files somewhere around.
It may be a bug in some specific Lazarus version. Though this happened to me a few years ago, so it should be a very obsolete one. But upgrading it won’t hurt unless it’s the latest one.
From your description, the most likely cause is that you had on your disk an old version of Castle Game Engine you downloaded a few years ago, and Lazarus remembers and reuses the package castle_base.lpk from there. To fix,
It should be enough if you just use “Preferences → Register Lazarus Packages” following the installation manual, Install | Manual | Castle Game Engine .
You can also just manually open and compile in Lazarus all CGE packages:
To avoid mistakes, I advise that you hunt down and delete the old Castle Game Engine 6.4 version from your disk. Look at Lazarus “Package → Install / Uninstall Packages…” window. In the bottom part of the window, you can see “Filename” – this is the path where Lazarus last heard about this package.