This is a new variable thickness Ada 2012 binding to SDL 2.x.y (http://www.libsdl.org). This means that things are
wrapped when they need to be into a thicker binding and those things that can just be imported, are.
There will still be a need to use conditional compilation for the various platforms as there will be
some platform specifics which cannot be abstracted out cleanly, but this will be reduced as much as possible.
The bindings are only generated for the specific parts of SDL which Ada does not already have support for, i.e.
threads are not bound as Ada has tasking support built in.
Usage, Licence & Attribution
SDLAda is distributed under the same zlib licence as the SDL library is. You may use this library in any way
you like whether free or commercial. I would add that whilst you don't have to state that your game uses this
library, it would be nice if you did, it's all good advertising for Ada :)
You do not need to complete any copyright assignment forms, the licence will not change from zlib as I want people to be
able to use the library however they wish without restrictions.
Building
Makefile
This was originally built with the idea that there could be different compilers and their build scripts would go into a build/<compiler> directory. This can still be built with the makefile, the subsequent extracted components cannot.
There are a number of variables which can be set to control the compilation:
SDL_PLATFORM = Can be set to one of the following values: linux, windows, macosx, macos_homebrew, ios or android
SDL_MODE = Can be one of: debug or release. Defaults to debug.
cd build/gnat
make SDL_PLATFORM=linux SDL_MODE=release
Alire
You can build the library with Alire now, by calling the following in the root directory:
alr build
This seems to have come up as an issue, people not checking the original makefile on lines 29 and 93 on how to link SDLAda. SDL2 comes with the sdl2-config command which includes the following options:
To everyone who has provided patches, pull requests, typo fixes, etc.
WARNING!!!
I have tried to model the types correctly, but remember SDL is a C library and some things may not make sense. Please
file a bug report if you use this library and find that a type does not cover enough values for cross-platform use.
TODO
Anything listed here is a question of whether it's required.
Do we need to hook into the Assert module? To raise an exception maybe?
Create event tagged type hierarchy, use Poll to convert the C events into these types.
Task safe event handling?
Split Image, TTF into separate GPR files.
Cross platform testing.
Optimisations to make the library as thin as possible:
Enable -gnatN for inlining.
Try to get as much pre-elaborated as possible.
Disable a shared library build, make it a static only build, this makes it easier to distribute. i.e. Link with this
library and distribute SDL2 libs only.
Hide the RWops stuff maybe? Should really be using Ada streams and files.
SDL.Video.GL.Set_Context_Profile accepts either Core, Compatibility, or ES, but the resulting context doesn't match. Traced the problem to sdl-video-gl.adb:470:
Result : C.int := SDL_GL_Set_Attribute (Attribute_Context_Profile, C.int (Profile_Values (Profile)));
Profile_Values is the array (1, 2, 4) and is being indexed incorrectly by Profile, an enum that itself has value 1, 2, or 4. I think Profile_Values is safe to remove, it's redundant and doesn't seem to be used anywhere else.
SDL_RenderGetLogicalSize and SDL_RenderSetLogicalSize have two parameters Width and Height instead of a single Size record structure and hence do not work as intended.
There are a number of types which relate to co-ordinate and placement of objects upon the screen / surface / texture, they should all be related so we don't have to use view conversions all over the place.
Also need to fix the types so they can handle signed values, in SDL2 they use int's so that objects can be "blitted" offscreen, then objects can appear from offscreen somewhere, i.e. a alien coming from the top of the screen to the bottom. This also allows testing for objects which are totally offscreen, i.e. alien goes off the bottom of the screen, remove it from the list of renderable items.
There are 2 Size records, SDL.Video.Sizes and SDL.Video.Rectangles.Size. There should be only one!
SDL_RenderGetLogicalSize (SDL_RenderGetLogicalSize) can set w and h to zero, this takes the SDL.Video.Rectangles.Size because the SDL.Video.Sizes has Width and Height defined as Positive when they should really be Natural.
I commented on #73 not realising the ticket was closed, and I am not sure if closed tickets generate notifications....
So here is the original:
I am attempting to build sdlada on FreeBSD and am also getting the issues with the build not finding any SDL header. I too have to patch three files to prepend SDL2 to the include directive.
Tho, I am unsure if I am building the project correctly, there is no Alire on FreeBSD yet, so I am using the Ports system to fetch, extract, and cd to ${SRC}/build/gnat/ and run GNU make there.
I have a library project .gpr file that with "sdlada". If sdlada is built as a static library then I get the following error: cannot import static library project "sdlada".
If I change Library_Kind in build/gnat/sdlada.gpr to "relocatable", then the error disappears.
// Tạo hình chữ nhật đại diện cho nhân vật
sf::RectangleShape player(sf::Vector2f(50.0f, 50.0f));
player.setFillColor(sf::Color::Green);
// Đặt vị trí ban đầu của nhân vật
player.setPosition(375.0f, 275.0f);
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event)) {
if (event.type == sf::Event::Closed)
window.close();
}
// Xử lý đầu vào - di chuyển nhân vật
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left)) {
player.move(-5.0f, 0.0f);
}
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Right)) {
player.move(5.0f, 0.0f);
}
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Up)) {
player.move(0.0f, -5.0f);
}
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Down)) {
player.move(0.0f, 5.0f);
}
window.clear();
// Vẽ nhân vật lên cửa sổ
window.draw(player);
window.display();
}
return 0;
For my project I need to create a video window inside an existing windows control.
This can be done by specifying the hwnd of this control, and use it in SDL.Video.Windows.Makers.Create.
However I can not create the necessary parameter (Native : in Native_Window) based on my hwnd (i.e. Win32 handle or simply an Integer). For now I added a function in SDL.Video.Windows that uses unchecked_conversion to create a Native_Window variable:
function From_Hwnd (Hwnd : Integer) return Native_Window is
function To_Address is new Ada.Unchecked_Conversion (Source => Integer, Target => System.Address);
begin
return Native_Window (To_Address (Hwnd));
end From_Hwnd;
sdl-video-palettes.adb:146:41: expected type "Palette_Constant_Access" defined at sdl-video-palettes.ads:124
sdl-video-palettes.adb:146:41: found type access to "Palette'CLASS" defined at line 69
sdl-video-palettes.adb:163:41: expected type "Palette_Constant_Access" defined at sdl-video-palettes.ads:124
sdl-video-palettes.adb:163:41: found type access to "Palette'CLASS" defined at line 69
Trying to compile a separate project that depends on SDLAda. I have followed the directions in README.md and installed the static library at $HOME/opt. The gpr located at $HOME/opt/share/gpr is accessible and shows in GPS as a dependency. The tests in the SDLAda library build and execute correctly.
When I try to take a test and compile it as part of a separate project, I get many linking errors:
gprbuild -d -P/home/XXXX/Documents/AdaProjects/airbase/airbase.gpr -XSDLADA_BUILD=release
Link
[link] sim.adb
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-events-events.o): in function `sdl__events__events__poll':
sdl-events-events.adb:(.text.sdl__events__events__poll+0x5): undefined reference to `SDL_PollEvent'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-events-events.o): in function `sdl__events__events__wait':
sdl-events-events.adb:(.text.sdl__events__events__wait+0x6): undefined reference to `SDL_WaitEvent'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put':
sdl-log.adb:(.text.sdl__log__put+0x28): undefined reference to `SDL_Log'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put__2':
sdl-log.adb:(.text.sdl__log__put__2+0x36): undefined reference to `SDL_LogMessage'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_critical':
sdl-log.adb:(.text.sdl__log__put_critical+0x30): undefined reference to `SDL_LogCritical'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_debug':
sdl-log.adb:(.text.sdl__log__put_debug+0x30): undefined reference to `SDL_LogDebug'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_error':
sdl-log.adb:(.text.sdl__log__put_error+0x30): undefined reference to `SDL_LogError'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_info':
sdl-log.adb:(.text.sdl__log__put_info+0x30): undefined reference to `SDL_LogInfo'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_verbose':
sdl-log.adb:(.text.sdl__log__put_verbose+0x30): undefined reference to `SDL_LogVerbose'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_warn':
sdl-log.adb:(.text.sdl__log__put_warn+0x30): undefined reference to `SDL_LogWarn'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__reset_priorities':
sdl-log.adb:(.text.sdl__log__reset_priorities+0x1): undefined reference to `SDL_LogResetPriorities'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__set':
sdl-log.adb:(.text.sdl__log__set+0x1): undefined reference to `SDL_LogSetAllPriority'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__set__2':
sdl-log.adb:(.text.sdl__log__set__2+0x1): undefined reference to `SDL_LogSetPriority'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-palettes.o): in function `sdl__video__palettes__create':
sdl-video-palettes.adb:(.text.sdl__video__palettes__create+0x57): undefined reference to `SDL_AllocPalette'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-palettes.o): in function `sdl__video__palettes(float, long double,...)(...)':
sdl-video-palettes.adb:(.text.sdl__video__palettes__free+0x12): undefined reference to `SDL_FreePalette'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__enclose':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__enclose+0x4b): undefined reference to `SDL_EnclosePoints'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__enclose__2':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__enclose__2+0x38): undefined reference to `SDL_EnclosePoints'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__has_intersected':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__has_intersected+0x20): undefined reference to `SDL_HasIntersection'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__intersects':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__intersects+0x29): undefined reference to `SDL_IntersectRect'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__clip_to':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__clip_to+0x33): undefined reference to `SDL_IntersectRectAndLine'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__union':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__union+0x25): undefined reference to `SDL_UnionRect'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__blit__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit__2+0x56): undefined reference to `SDL_UpperBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit__2+0x95): undefined reference to `SDL_UpperBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit__2+0xad): undefined reference to `SDL_UpperBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit__2+0xca): undefined reference to `SDL_UpperBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__blit_scaled__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit_scaled__2+0x7e): undefined reference to `SDL_UpperBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit_scaled__2+0xc5): undefined reference to `SDL_UpperBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit_scaled__2+0xdb): undefined reference to `SDL_UpperBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit_scaled__2+0xeb): undefined reference to `SDL_UpperBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__fill__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__fill__2+0x21): undefined reference to `SDL_FillRects'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__clip_rectangle':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__clip_rectangle+0x1d): undefined reference to `SDL_GetClipRect'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_clip_rectangle':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_clip_rectangle+0x16): undefined reference to `SDL_SetClipRect'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__alpha_blend':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__alpha_blend+0xf): undefined reference to `SDL_GetSurfaceAlphaMod'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_alpha_blend':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_alpha_blend+0xe): undefined reference to `SDL_SetSurfaceAlphaMod'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__blend_mode':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blend_mode+0xf): undefined reference to `SDL_GetSurfaceAlphaMod'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_blend_mode':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_blend_mode+0xa): undefined reference to `SDL_SetSurfaceBlendMode'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__colour':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__colour+0x19): undefined reference to `SDL_GetSurfaceColorMod'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_colour':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_colour+0x1b): undefined reference to `SDL_SetSurfaceColorMod'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__lock':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__lock+0xa): undefined reference to `SDL_LockSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__unlock':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__unlock+0x5): undefined reference to `SDL_UnlockSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_rle':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_rle+0xe): undefined reference to `SDL_SetSurfaceRLE'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__finalize':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__finalize+0x14): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__surfaceDF__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__surfaceDF__2+0x14): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_colour_key':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_colour_key+0x29): undefined reference to `SDL_SetColorKey'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__blit':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit+0x1b): undefined reference to `SDL_UpperBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__blit_scaled':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit_scaled+0x1b): undefined reference to `SDL_UpperBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__lower_blit':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__lower_blit+0x32): undefined reference to `SDL_LowerBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__lower_blit_scaled':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__lower_blit_scaled+0x32): undefined reference to `SDL_LowerBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces(float, int, long, long)':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__fill+0x21): undefined reference to `SDL_FillRect'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__colour_key':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__colour_key+0x12): undefined reference to `SDL_GetColorKey'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces___assign__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces___assign__2+0x61): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__surfaceSI__2.cold.30':
sdl-video-surfaces.adb:(.text.unlikely.sdl__video__surfaces__surfaceSI__2+0x5c): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__surfaceSI__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__surfaceSI__2+0xa1): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__surfaceFD':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__surfaceFD+0x14): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__finalize_spec':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__finalize_spec+0x46): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows-makers.o): in function `sdl__video__windows__makers__create':
sdl-video-windows-makers.adb:(.text.sdl__video__windows__makers__create+0x41): undefined reference to `SDL_CreateWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows-makers.o): in function `sdl__video__windows__makers__create__3':
sdl-video-windows-makers.adb:(.text.sdl__video__windows__makers__create__3+0xc): undefined reference to `SDL_CreateWindowFrom'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__is_grabbed':
sdl-video-windows.adb:(.text.sdl__video__windows__is_grabbed+0x9): undefined reference to `SDL_GetWindowGrab'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_grabbed':
sdl-video-windows.adb:(.text.sdl__video__windows__set_grabbed+0x9): undefined reference to `SDL_SetWindowGrab'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_id':
sdl-video-windows.adb:(.text.sdl__video__windows__get_id+0x5): undefined reference to `SDL_GetWindowID'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_maximum_size':
sdl-video-windows.adb:(.text.sdl__video__windows__set_maximum_size+0xc): undefined reference to `SDL_SetWindowMaximumSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_minimum_size':
sdl-video-windows.adb:(.text.sdl__video__windows__set_minimum_size+0xc): undefined reference to `SDL_SetWindowMinimumSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__pixel_format':
sdl-video-windows.adb:(.text.sdl__video__windows__pixel_format+0x9): undefined reference to `SDL_GetWindowPixelFormat'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_position':
sdl-video-windows.adb:(.text.sdl__video__windows__set_position+0xc): undefined reference to `SDL_SetWindowPosition'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_size':
sdl-video-windows.adb:(.text.sdl__video__windows__set_size+0xc): undefined reference to `SDL_SetWindowSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__hide':
sdl-video-windows.adb:(.text.sdl__video__windows__hide+0x5): undefined reference to `SDL_HideWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__show':
sdl-video-windows.adb:(.text.sdl__video__windows__show+0x5): undefined reference to `SDL_ShowWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__maximise':
sdl-video-windows.adb:(.text.sdl__video__windows__maximise+0x5): undefined reference to `SDL_MaximizeWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__minimise':
sdl-video-windows.adb:(.text.sdl__video__windows__minimise+0x5): undefined reference to `SDL_MinimizeWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__raise_and_focus':
sdl-video-windows.adb:(.text.sdl__video__windows__raise_and_focus+0x5): undefined reference to `SDL_RaiseWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__restore':
sdl-video-windows.adb:(.text.sdl__video__windows__restore+0x5): undefined reference to `SDL_RestoreWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_icon':
sdl-video-windows.adb:(.text.sdl__video__windows__set_icon+0x15): undefined reference to `SDL_SetWindowIcon'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__update_surface_rectangles':
sdl-video-windows.adb:(.text.sdl__video__windows__update_surface_rectangles+0x21): undefined reference to `SDL_UpdateWindowSurfaceRects'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_brightness':
sdl-video-windows.adb:(.text.sdl__video__windows__get_brightness+0x9): undefined reference to `SDL_GetWindowBrightness'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_brightness':
sdl-video-windows.adb:(.text.sdl__video__windows__set_brightness+0x13): undefined reference to `SDL_SetWindowBrightness'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_data':
sdl-video-windows.adb:(.text.sdl__video__windows__get_data+0x28): undefined reference to `SDL_GetWindowData'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_data':
sdl-video-windows.adb:(.text.sdl__video__windows__set_data+0x2d): undefined reference to `SDL_SetWindowData'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__display_index':
sdl-video-windows.adb:(.text.sdl__video__windows__display_index+0x13): undefined reference to `SDL_GetWindowDisplayIndex'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_display_mode':
sdl-video-windows.adb:(.text.sdl__video__windows__get_display_mode+0x13): undefined reference to `SDL_GetWindowDisplayMode'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_display_mode':
sdl-video-windows.adb:(.text.sdl__video__windows__set_display_mode+0x13): undefined reference to `SDL_SetWindowDisplayMode'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_flags':
sdl-video-windows.adb:(.text.sdl__video__windows__get_flags+0xe): undefined reference to `SDL_GetWindowFlags'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_gamma_ramp':
sdl-video-windows.adb:(.text.sdl__video__windows__get_gamma_ramp+0x13): undefined reference to `SDL_GetWindowGammaRamp'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_gamma_ramp':
sdl-video-windows.adb:(.text.sdl__video__windows__set_gamma_ramp+0x13): undefined reference to `SDL_SetWindowGammaRamp'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_maximum_size':
sdl-video-windows.adb:(.text.sdl__video__windows__get_maximum_size+0x2c): undefined reference to `SDL_GetWindowMaximumSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_minimum_size':
sdl-video-windows.adb:(.text.sdl__video__windows__get_minimum_size+0x2c): undefined reference to `SDL_GetWindowMinimumSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_position':
sdl-video-windows.adb:(.text.sdl__video__windows__get_position+0x28): undefined reference to `SDL_GetWindowPosition'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_size':
sdl-video-windows.adb:(.text.sdl__video__windows__get_size+0x2c): undefined reference to `SDL_GetWindowSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_surface':
sdl-video-windows.adb:(.text.sdl__video__windows__get_surface+0x13): undefined reference to `SDL_GetWindowSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_title':
sdl-video-windows.adb:(.text.sdl__video__windows__get_title+0x12): undefined reference to `SDL_GetWindowTitle'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_title':
sdl-video-windows.adb:(.text.sdl__video__windows__set_title+0x3a): undefined reference to `SDL_SetWindowTitle'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__update_surface':
sdl-video-windows.adb:(.text.sdl__video__windows__update_surface+0x13): undefined reference to `SDL_UpdateWindowSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__update_surface_rectangle':
sdl-video-windows.adb:(.text.sdl__video__windows__update_surface_rectangle+0x24): undefined reference to `SDL_UpdateWindowSurfaceRects'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_mode':
sdl-video-windows.adb:(.text.sdl__video__windows__set_mode+0x20): undefined reference to `SDL_SetWindowFullscreen'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__finalize':
sdl-video-windows.adb:(.text.sdl__video__windows__finalize+0x18): undefined reference to `SDL_DestroyWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__from_id':
sdl-video-windows.adb:(.text.sdl__video__windows__from_id+0x9d): undefined reference to `SDL_GetWindowFromID'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video.o): in function `sdl__video__is_screen_saver_enabled':
sdl-video.adb:(.text.sdl__video__is_screen_saver_enabled+0x5): undefined reference to `SDL_IsScreenSaverEnabled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video.o): in function `sdl__video__initialise':
sdl-video.adb:(.text.sdl__video__initialise+0x19): undefined reference to `SDL_VideoInit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video.adb:(.text.sdl__video__initialise+0x3b): undefined reference to `SDL_VideoInit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video.o): in function `sdl__video__total_drivers':
sdl-video.adb:(.text.sdl__video__total_drivers+0x6): undefined reference to `SDL_GetNumVideoDrivers'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video.o): in function `sdl__video__driver_name':
sdl-video.adb:(.text.sdl__video__driver_name+0x8): undefined reference to `SDL_GetVideoDriver'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video.o): in function `sdl__video__current_driver_name':
sdl-video.adb:(.text.sdl__video__current_driver_name+0x6): undefined reference to `SDL_GetCurrentVideoDriver'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-error.o): in function `sdl__error__set':
sdl-error.adb:(.text.sdl__error__set+0x28): undefined reference to `SDL_SetError'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-error.o): in function `sdl__error__get':
sdl-error.adb:(.text.sdl__error__get+0x5): undefined reference to `SDL_GetError'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces-makers.o): in function `sdl__video__surfaces__makers__create':
sdl-video-surfaces-makers.adb:(.text.sdl__video__surfaces__makers__create+0x50): undefined reference to `SDL_CreateRGBSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sim.o: in function `_ada_sim':
sim.adb:(.text+0x34b): undefined reference to `SDL_MapRGB'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sim.adb:(.text+0x3f3): undefined reference to `SDL_MapRGB'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sim.adb:(.text+0x474): undefined reference to `SDL_MapRGB'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sim.adb:(.text+0x5e6): undefined reference to `SDL_MapRGB'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sim.adb:(.text+0x820): undefined reference to `SDL_Quit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-pixel_formats.o): in function `sdl__video__pixel_formats__image':
sdl-video-pixel_formats.adb:(.text.sdl__video__pixel_formats__image+0xe): undefined reference to `SDL_GetPixelFormatName'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-pixel_formats.o): in function `sdl__video__pixel_formats__to_colour':
sdl-video-pixel_formats.adb:(.text.sdl__video__pixel_formats__to_colour+0x24): undefined reference to `SDL_GetRGBA'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-pixel_formats.o): in function `sdl__video__pixel_formats__to_pixel__3':
sdl-video-pixel_formats.adb:(.text.sdl__video__pixel_formats__to_pixel__3+0x1a): undefined reference to `SDL_MapRGBA'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-pixel_formats.o): in function `sdl__video__pixel_formats__to_masks':
sdl-video-pixel_formats.adb:(.text.sdl__video__pixel_formats__to_masks+0x2b): undefined reference to `SDL_PixelFormatEnumToMasks'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl.o): in function `sdl__initialise':
sdl.adb:(.text.sdl__initialise+0x5): undefined reference to `SDL_Init'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl.o): in function `sdl__initialise_sub_system':
sdl.adb:(.text.sdl__initialise_sub_system+0x5): undefined reference to `SDL_InitSubSystem'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl.o): in function `sdl__was_initialised':
sdl.adb:(.text.sdl__was_initialised+0x3): undefined reference to `SDL_WasInit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl.o): in function `sdl__was_initialised__2':
sdl.adb:(.text.sdl__was_initialised__2+0x4): undefined reference to `SDL_WasInit'
collect2: error: ld returned 1 exit status
gprbuild: link of sim.adb failed
gprbuild: failed command was: /usr/GNAT/2019/bin/gcc sim.o b__sim.o /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a -L/home/XXXX/Documents/AdaProjects/airbase/obj/ -L/home/XXXX/Documents/AdaProjects/airbase/obj/ -L/home/XXXX/opt/sdlada/lib/sdlada.release/ -L/usr/GNAT/2019/lib/gcc/x86_64-pc-linux-gnu/8.3.1/adalib/ -static-libgcc /usr/GNAT/2019/lib/gcc/x86_64-pc-linux-gnu/8.3.1/adalib/libgnat.a -ldl -Wl,-rpath-link,/usr/GNAT/2019/lib/gcc/x86_64-pc-linux-gnu/8.3.1//adalib -Wl,-z,origin,
-rpath,$ORIGIN/:$ORIGIN/../../../..//opt/sdlada/lib/sdlada.release:/usr/GNAT/2019/lib/gcc/x86_64-pc-linux-gnu/8.3.1/adalib -o sim
[2021-03-06 17:39:15] process exited with status 4, 100% (12/12), elapsed time: 00.57s
```
Set_Color_Key does not work on macOS with SDL2 version 2.0.10.
It works with Homebrew SDL2 version 2.0.12.
Suggest to introduce optional flag SDL_FRAMEWORK=False/True for frameworks.
I will make patch when approved.
When I have tried to get SDLAda working on Mac most of the trouble is about getting the version info working.
All ado about som library versions that I do not check or care much about anyway.
Therefore I suggest removing dependance on C sources in the main project.
This will imo make it much easier for newcomers to use SDLAda.
Perhaps version info (in needed) could be put into a separate gpr file and postpone version checking until link time.
Luke,
I see sdlada currently supports sdl207. Do you have yet a sense of how different 208 is?
I have a c++ code that compiles using 207 headers and 208 libraries that seems to work Ok, given the limited interfaces my code actually uses.
I am planning to try using sdlada soon, but it would be even sooner if I knew you had support for 208 coming soon. Are you planning an update any time soon?
(feel free to close this issue since it's just a question...could not find your email anywhere...)
thx,
Rod [email protected]
The routines SDL.Video.Surfaces.Colour_Key (calls SDL_GetColorKey)
and SDL.Video.Surfaces.Set_Colour_Key (calls SDL_SetColorKey) both crash with an exception Surface_Error.
I need the Set_Colour_Key in order to make my image (bmp) transparent.
To test these functions, I added some calls to the load_image.adb example (just after Window_Surface := W.Get_Surface) :
declare
Color_Key : SDL.Video.Palettes.Colour;
begin
Color_Key := SDL.Video.Surfaces.Colour_Key (Window_Surface);
end;
I noticed that the Set_Colour_Key procedure was missing a parameter for flags, but fixing this did not help.
In the SDL_GL_BindTexture) section, this function returns two floating point values, why are they floats instead of ints? In the source these can be 0.0, 1.0 or the texture dimensions. In the examples they are multiplied by texture coords.
Should the binding reflect this?
Move the function to SDL.Video.Textures.GL package to reflect what it operates on or keep where it is?
Need a tagged event hierarchy rather than a copy of the C struct.
Root type
Keyboard type
Joystick type
Mouse type
Rename SDL.Events.Events and make it a private package, or move the Events type to the private part of SDL.Events.
Move SDL.Events.Events.Poll to SDL.Events.Poll and change to use the tagged types.
Use Ada's factory for creating tagged types - too much overhead, too slow?
Investigate calling SDL.Events.Poll in the library, copying all events to an event queue held in a protected object. This would help with tasking at a higher level. This might also be a bit slower, needs to be checked.
The "bar" is missing. Gdb reveals the string is not being passed from Ada to C properly in the call to SDL_LogDebug(). I suspect it's related to this caveat on 'C' calling conventions, especially because SDL_Log() takes one argument while SDL_LogDebug() takes two:
In C, varargs allows a function to take a variable number of arguments. There is no direct equivalent in this to Ada. One approach that can be used is to create a C wrapper for each different profile and then interface to this C wrapper. For example, to print an int value using printf, create a C function printfi that takes two arguments, a pointer to a string and an int, and calls printf. Then in the Ada program, use pragma Import to interface to printfi.
It may work on some platforms to directly interface to a varargs function by providing a specific Ada profile for a particular call. However, this does not work on all platforms, since there is no guarantee that the calling sequence for a two argument normal C function is the same as for calling a varargs C function with the same two arguments.
Hi , i just want to use the library .
I unzip the archive and open a terminal into it .
When i apply the README file , i got the following errors =
How solve the problem ?
Originally reported here. My suspicion is that the latest version of ada has a new feature which does not allow this anonymous type usage anymore.
[Ada] sdl-video-palettes.adb
sdl-video-palettes.adb:146:41: error: expected type "Palette_Constant_Access" defined at sdl-video-palettes.ads:124
sdl-video-palettes.adb:146:41: error: found type access to "Palette'CLASS" defined at line 69
sdl-video-palettes.adb:163:41: error: expected type "Palette_Constant_Access" defined at sdl-video-palettes.ads:124
sdl-video-palettes.adb:163:41: error: found type access to "Palette'CLASS" defined at line 69
Unfortunately that issue was only partially solved, hence this new issue. Sorry for the confusion.
I found that running a program that calls Set_Colour_Key (SDL_SetColorKey) raises an Exception_Access_Violation exception.
(on my Win10 machine this is a segmentation fault in SDL2.dll:
0x6c7e490d in SDL_LogCritical() from SDL2dll
Version SDL 2.0.7 32bits - SDL2.dll 23-10-2017 996.352 bytes)
Also I added the extra ´Flag' parameter and created a simple pixel value, but to no avail.