PascalGameDevelopment/SDL2-for-Pascal

sdl2_ttf.pas compile failed in delphi

Closed this issue · 2 comments

function TTF_OpenFontIndex(file_: PAnsiChar; ptsize: cint; index: clong): PTTF_Font; cdecl;
external TTF_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_TTF_OpenFontIndex' {$ENDIF} {$ENDIF};
function TTF_OpenFontIndexRW(src: PSDL_RWops; freesrc: cint; ptsize: cint; index: clong): PTTF_Font; cdecl;
external TTF_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name 'TTF_OpenFontIndexRW' {$ENDIF} {$ENDIF};
function TTF_OpenFontIndexDPI(file
: PAnsiChar; ptsize: cint; index: clong; hdpi: cuint; vdpi: cuint): PTTF_Font; cdecl;
external TTF_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_TTF_OpenFontIndexDPI' {$ENDIF} {$ENDIF};
function TTF_OpenFontIndexDPIRW(src: PSDL_RWops; freesrc: cint; ptsize: cint; index: clong; hdpi: cuint; vdpi: cuint):
PTTF_Font; cdecl;
external TTF_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_TTF_OpenFontIndexDPIRW' {$ENDIF} {$ENDIF};
function TTF_FontFaces(font: PTTF_Font): clong; cdecl;
external TTF_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_TTF_FontFaces' {$ENDIF} {$ENDIF};

compile error:
[dcc32 Error] sdl2_ttf.pas(245): E2003 Undeclared identifier: 'clong'

Hello @achinastone, Thanks for the report!

not sure if you saw the patch from @suve added as pull request (see. PR #104). Could you try out if this fixes the issue. Then we can apply or tweak it.

Best regards
Matthias