I not use FPC, I use DelphiXE4 and I like compile SDL2 to WIN32, WIN64, OSX and IOS (and Android when DelphiXE5 relased)
This is article by embarcadero:
http://docwiki.embarcadero.com/RADSt...ared_Libraries
I like call always to function SDL_Init in my games/engine and if destination is OSX autimatically rename it to _SDL_Init.
I can make this:
Code:
interface {$IFDEF MACOS}function _SDL_Init(flags: UInt32): SInt32 cdecl; external {$IFDEF GPC} name 'SDL_Init' {$ELSE} SDL_LibName {$ENDIF};
{$ELSE}
function SDL_Init(flags: UInt32): SInt32 cdecl; external {$IFDEF GPC} name 'SDL_Init' {$ELSE} SDL_LibName {$ENDIF};
{$ENDIF}
But I don't like, because in games/engine I need call to SDL_Init or _SDL_Init and I like call allways to SDL_Init regardless of platform
Bookmarks