[lazarus] Building lazarus for win32 with fpc 1.0.11 fails

Micha Nelissen micha at neli.hopto.org
Tue Dec 30 12:16:38 EST 2003


Vincent Snijders wrote:

> Hi,
> 
> ATM I can't make lazarus with fpc 1.0.11. The reason is this:
> 
> Fpc 1.0.10 contains the folowing functions in the windows unit.
> 
> function Polygon(_para1:HDC; var _para2:POINT; _para3:longint):WINBOOL;
> external 'gdi32' name 'Polygon'; 
> function Polyline(_para1:HDC; var _para2:POINT; _para3:longint):WINBOOL;
> external 'gdi32' name 'Polyline'; 
> function PolyBezier(_para1:HDC; var _para2:POINT; _para3:DWORD):WINBOOL;
> external 'gdi32' name 'PolyBezier'; 	 
> 
> About 2 weeks ago the FPC team changed these to:
> function Polygon(_para1:HDC; _para2:LPPOINT; _para3:longint):WINBOOL;
> external 'gdi32' name 'Polygon';
> function Polyline(_para1:HDC; _para2:LPPOINT; _para3:longint):WINBOOL;
> external 'gdi32' name 'Polyline';
> function PolyBezier(_para1:HDC; _para2:LPPOINT; _para3:DWORD):WINBOOL;
> external 'gdi32' name 'PolyBezier';
> 
> Note that the second parameter is not a var parameter anymore.
> 
> Yesterday Micha fixed a lot of range check errors, but in the process
> changed
>  Windows.Polyline(DC, LPPOINT(Points)^, NumPts)
> To 
>  Windows.Polyline(DC, LPPOINT(Points), NumPts)
> 
> The same to the Polygon function, but not the PolyBezier function. 
> Question 1:
> Should the same change be made to PolyBezier as well?
> Question 2:
> Can the compilation be fixed for fpc 1.0.x? (By putting the '^' back or
> $ifdef?)

If I put the ^ back, will fpc 1.9.x generate the correct code? In that 
case, I will put it back gladly. Otherwise, please make the windows unit 
between 1.9 and 1.0 compatible....

Micha.






More information about the Lazarus mailing list