Results 1 to 10 of 64

Thread: SDL 2.0 Headers for [Object] Pascal?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    with FPC maybe ( public name ) helps
    Last edited by AirPas; 27-08-2013 at 01:34 PM.

  2. #2
    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
    Last edited by kotai; 27-08-2013 at 01:57 PM.
    www.kotai.es
    www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
    www.miniracingonline.com

  3. #3
    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;
    {$ELSE}
    function SDL_Init(flags: UInt32): SInt32 cdecl; external;
    {$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
    www.kotai.es
    www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
    www.miniracingonline.com

  4. #4
    I found a solution:

    Code:
    function SDL_Init(flags: UInt32): SInt32 cdecl; external SDL_LibName {$IFDEF MACOS} name '_SDL_Init' {$ENDIF};
    I will delete all {$IFDEF GPC} name 'XXX' {$ELSE} SDL_LibName {$ENDIF};
    and I will use {$IFDEF MACOS} name '_XXX' {$ENDIF};
    I not need compile with GNU Pascal Compliler, I need compile only with DelphiXE4

    Kotai
    Last edited by kotai; 27-08-2013 at 02:51 PM.
    www.kotai.es
    www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
    www.miniracingonline.com

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •