Page 1 of 1
iOS compilation fails with new 2012 version
Posted: Fri Mar 30, 2012 12:21 pm
by 16561419
Hello,
I just installed TChart 2012 Pro and then copied the new FMI folder content to
the the Developer\Embaracadero\fmi folder on my MAC.
When I try to start an iOS program in XCode that previously compiled (FPC 2.6.0) and worked then
I get an compiler error message:
FMXTee_Series_Shape.pas (485,24) Error: can't determine which overloaded function to call
How can I solve this?
best regards,
X-ray
Re: iOS compilation fails with new 2012 version
Posted: Mon Apr 02, 2012 6:23 am
by 16561419
Hello,
to get this compiled I replaced:
xysPixels: result:=TeeRect( Trunc(X0), Trunc(Y0), Trunc(X1), Trunc(Y1) );
xysAxis : result:=TeeRect( CalcXPos(0),CalcYPos(0),CalcXPos(1),CalcYPos(1) );
by
xysPixels: result:=TRectF.Create( Trunc(X0), Trunc(Y0), Trunc(X1), Trunc(Y1) );
xysAxis : result:=TRectF.Create( CalcXPos(0),CalcYPos(0),CalcXPos(1),CalcYPos(1) );
best regards,
X-Ray
Re: iOS compilation fails with new 2012 version
Posted: Tue Apr 03, 2012 10:30 am
by yeray
Hi X-Ray,
I'm not sure it should be necessary.
I see in TeCanvas.pas:
Code: Select all
{$IFDEF FMX}
type
TRect=TRectF;
{$ENDIF}
That I think it should do the trick. Could you please check if you have TeCanvas i the uses clause?
Thanks in advance.
Re: iOS compilation fails with new 2012 version
Posted: Tue Apr 03, 2012 1:00 pm
by 16561419
Hi Yeray,
I didn't change any TChart code I simply copied the code from the FMI folder to my MAC.
So it should fail on your end too!
And yes TeCanvas and FMXTee_Canvas is in the uses clause.
best regards,
X-Ray
Re: iOS compilation fails with new 2012 version
Posted: Thu Apr 05, 2012 8:13 am
by yeray
Hi,
I haven't tried it in a Mac but you could try the following to force freepascal to use the TeeRect overload that takes a single as first parameter:
Code: Select all
xysPixels: result:=TeeRect( {$IFDEF FPC}1.0*{$ENDIF} Trunc(X0), Trunc(Y0), Trunc(X1), Trunc(Y1) );
xysAxis : result:=TeeRect( {$IFDEF FPC}1.0*{$ENDIF} CalcXPos(0),CalcYPos(0),CalcXPos(1),CalcYPos(1) );