用fpc trunk+lazarus trunk (2025-06-09)編譯jvcl出現以下2個類型的錯誤:
1、Identifier not found "OffsetRect"
1、Identifier not found "OffsetRect"
Error: Identifier not found "OffsetRect"

2、出現:
jvxpcoreutils.pas(96,97) Error: Incompatible type for arg no. 4: Got "TFPGradientDirection", expected "TGradientDirection"

解決方法:
1、第1個問題只需在uses 增加Types單元。

第2個問題:
在gdHorizontal,gdVertical前增加:Graphics.
Graphics.gdHorizontal
Graphics.gdVertical
// Ignoring "AColors" and "Dithered" procedure JvXPCreateGradientRect(const AWidth, AHeight: Integer; const StartColor, EndColor: TColor; const AColors: TJvXPGradientColors; const Style: TJvXPGradientStyle; const Dithered: Boolean; var Bitmap: TBitmap); begin if (AHeight <= 0) or (AWidth <= 0) then Exit; Bitmap.Height := AHeight; Bitmap.Width := AWidth; Bitmap.PixelFormat := pf24bit; case Style of gsLeft: Bitmap.Canvas.GradientFill(Rect(0, 0, AWidth, AHeight), StartColor, EndColor, Graphics.gdHorizontal); gsRight: Bitmap.Canvas.GradientFill(Rect(0, 0, AWidth, AHeight), EndColor, StartColor, Graphics.gdHorizontal); gsTop: Bitmap.Canvas.GradientFill(Rect(0, 0, AWidth, AHeight), StartColor, EndColor, Graphics.gdVertical); gsBottom: Bitmap.Canvas.GradientFill(Rect(0, 0, AWidth, AHeight), EndColor, StartColor, Graphics.gdVertical); end; end;

修改后重新編譯就可以

浙公網安備 33010602011771號