Thanks @User137.
In Delphi what command I need use for load external library or framework in OSX ?
I use:
like:Code:function FName(FParams):FType cdecl; external LibraryName;
But not work in OSX, not found function SDL_InitCode:function SDL_Init(flags: UInt32): SInt32 cdecl; external SDL2;
Thanks
www.kotai.es
www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
www.miniracingonline.com
Well, StoneyFD says it works now with MacOS, try it with the new Release.
Hi
Thanks for update SDL2. I update my version with your updates except modular, I like more all in same file.
I add SDL_messagebox.h:
And support for load and save BMP in surfaces form TmemoryStream for copy TPicture.TBitmap to surface and viceversa.Code://////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////// SDL_messagebox.h //////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////// const //SDL_MessageBoxFlags; SDL_MESSAGEBOX_ERROR = $00000010; //**< error dialog */ SDL_MESSAGEBOX_WARNING = $00000020; //**< warning dialog */ SDL_MESSAGEBOX_INFORMATION = $00000040; //**< informational dialog */ //SDL_MessageBoxButtonFlags; SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = $00000001; //**< Marks the default button when return is hit */ SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = $00000002; //**< Marks the default button when escape is hit */ function SDL_ShowSimpleMessageBox(flags : Uint32; const title : PAnsiChar; const message : PAnsiChar; window : PSDL_Window): UInt32 cdecl; external {$IFDEF GPC} name 'SDL_ShowSimpleMessageBox' {$ELSE} SDL_LibName {$ENDIF};
I test again to compile for MAC and have same problem:
I search in embarcadero help and I see all functions in OSX need begin with "_".Code:dyld: lazy symbol binding failed: Symbol not found: SDL_Init
I rename SDL_Init function to _SDL_Init and WORK OK !!!!
I rename several functions and now I can create windows and renderer in OSX.
But now not compile with win32/win64:
I do not know how to make function that add "_ " before name function for MACOS.Code:Not found the procedure entry point _SDL_Init in the dynamic link library.
I would like the name of the function is always "SDL_Init" but when I compile for MACOS renamed for "_SDL_Init"
Thanks.
www.kotai.es
www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
www.miniracingonline.com
with FPC maybe ( public name ) helps
Last edited by AirPas; 27-08-2013 at 01:34 PM.
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:
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 platformCode: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}
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
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:
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 platformCode:interface {$IFDEF MACOS} function _SDL_Init(flags: UInt32): SInt32 cdecl; external; {$ELSE} function SDL_Init(flags: UInt32): SInt32 cdecl; external; {$ENDIF}
www.kotai.es
www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
www.miniracingonline.com
fixed.
Now my headers should work with Delphi + MacOS, too. Could you test them, kotai?
Bookmarks