Page 1 of 1

Compiler Error - Overloaded Function in Source Code?

PostPosted: 05 Aug 2013, 23:24
by Mritter26
I recently followed the step by step guide for compiling the source code project, didn't change a thing, but I ran into an error on line 414 in KM_Points that states the following:

\castlesand\KM_Points.pas(414,13) Error: Can't determine which overloaded function to call
\castlesand\KM_Points.pas(389,10) Hint: Found declaration: KMGetDirection(Single,Single):<enumeration type>;
\castlesand\KM_Points.pas(372,10) Hint: Found declaration: KMGetDirection(LongInt,LongInt):<enumeration type>;
\castlesand\KM_Points.pas(713) Fatal: There were 1 errors compiling module, stopping


The function is coded as follows:
function KMGetDirection(FromPos, ToPos: TKMPoint): TKMDirection;
begin
Result := KMGetDirection(ToPos.X - FromPos.X, ToPos.Y - FromPos.Y);
end;

I, for the life of me, cannot figure out where this error is coming from. I understand overloading and everything seems to be great. I'm using Lazarus IDE v1.0.10 and I'm familiar with using Java/C++ but not Pascal so please forgive me if this is a stupid question. Thanks!

Re: Compiler Error - Overloaded Function in Source Code?

PostPosted: 06 Aug 2013, 01:24
by Lewin
That happens when you use the 64 bit version of Lazarus. We currently only support 32 bit compiling. 64 bit support wouldn't be hard to add, it just needs some renaming/fixing in the source code, and currently we have no motivation since 64 bit won't really bring any advantages (we use 64 bit data types rarely). Even big game engines like Crysis get pretty much the same performance in the 32 and 64 bit versions.