sdlada icon indicating copy to clipboard operation
sdlada copied to clipboard

libsdlada.a can't link to sdl2 in linux

Open jlots opened this issue 3 years ago • 3 comments

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
```

jlots avatar Mar 06 '21 22:03 jlots

Look at the makefile and how I've had to link sdl, doesn't look like your doing that.

Lucretia avatar Mar 07 '21 10:03 Lucretia

It would be nice to add in the README what changes are needed on the .gpr file of the project that uses this via alire. Currently, doing 'alr with sdlada' works fine, but you get the undefined references as noted above when trying to actually call anything in SDL. From memory, this is quite normal when grabbing a library intended for use in C/C++, and I need to add ("-lSDL2main", "-lSDL2", "-lSDL2_image"); compile switches one way or another in your .gpr file.

TamaMcGlinn avatar Sep 26 '22 18:09 TamaMcGlinn

Found it! @jlots add this:

   package Linker is
      for Switches ("Ada") use ("-lSDL2main", "-lSDL2", "-lSDL2_image");
   end Linker;

And to your compile flags, add the output from sdl2-config --cflags on your machine, e.g.:

   package Compiler is
      for Default_Switches ("Ada") use
         ("-I/usr/include/SDL2", "-D_REENTRANT") & -- add this line
        Compile_Checks_Switches &
        Build_Switches &
        Runtime_Checks_Switches &
        Style_Checks_Switches &
        Contracts_Switches &
        ("-gnatw.X", -- Disable warnings for No_Exception_Propagation
         "-gnatQ");  -- Don't quit. Generate ALI and tree files even if illegalities
   end Compiler;

(the hint was in sdlada's build/gnat/makefile line 29)

TamaMcGlinn avatar Sep 26 '22 18:09 TamaMcGlinn

@TamaMcGlinn add where? There are several Compiler and Linker packages across SDLAda in various gpr files and none of them look like any of these.

2colours avatar Jun 27 '23 13:06 2colours

He means put them in your project's gpr file. They are in the makefile as SDL2 was a little bit tricky to make work entirely portably, i.e. with just "make," with gpr files.

You might find using alire easier.

Lucretia avatar Jun 27 '23 14:06 Lucretia

I did use alire but just as described in the comments, all kinds of linker errors arise. And it's not at all obvious why "my project's gpr file" should have anything like these, especially when using alire.

Anyway, to be frank, there is ASFML and that really just works:tm:. That's enough for me.

2colours avatar Jun 27 '23 21:06 2colours

SDL2 has a sdl2-config executable which you have to use to be portable to get the cflags and the ldflags to add to your project (SDL3 doesn't have this), as stated above, this is all in the makefile in the build/gnat directory. We cannot call this from within the gpr file. Alire can, see the sdl's toml file as I call the makefile from there.

Lucretia avatar Jun 28 '23 12:06 Lucretia

Currently, doing 'alr with sdlada' works fine, but you get the undefined references as noted above when trying to actually call anything in SDL.

As previously stated, that's exactly right. alr build won't work, once you actually need to link any SDL calls. But anyway.

2colours avatar Jun 28 '23 12:06 2colours

Added this to the README with a pointer to the makefile. I don't think it's too difficult to add this to your gprbuild command line and you can always script it.

Lucretia avatar Jun 28 '23 14:06 Lucretia

Some people wouldn't check how to release a library that works out of the box.

2colours avatar Jun 28 '23 14:06 2colours

SFML doesn't have a script required to build properly whereby flags can change even on the same platform. SDL does have this, it's called sdl2-config. And there's no excuse not for checking how to build something.

Lucretia avatar Jun 28 '23 17:06 Lucretia

There is no excuse for not providing working artifacts and then trying to downplay it as if it was the duty of the user to tinker with the internals of a package.

2colours avatar Jun 28 '23 21:06 2colours

There's no excuse for being rude either.

Lucretia avatar Jun 29 '23 15:06 Lucretia

Okay, one final, patient attempt...

Is there any particular reason you are assuming that a released library (any released library) shouldn't just work without ad-hoc tinkering of the internal building process? For what it's worth, I quickly checked a Raku binding library and a Pascal binding library to the very same SDL2 library and nothing like that was needed so it doesn't seem like it's a quintessential property of SDL2.

We may disagree about a certain named reason but without any such reason, this whole apparent "meh, you can find out the problem and fix it for yourself" mentality is simply unsuited for package release and maintenance. We may call it "rude" if you fancy that word but one thing is sure: something isn't released and maintained software just because it appears over the internet encoupled with some license. In this case, it may actually be better if it's apparent that it's not released with the intention to make it actually work as much as possible, rather than trying to normalize semi-functional releases.

2colours avatar Jun 29 '23 22:06 2colours

Let's get one thing straight, READ THIS and THIS because you don't seem to have bothered to find out.

I was advised to "release" this on alire for the crate competition as things were not going well for me, it could've helped financially. I released it for Linux as that is my current platform. Others did work to get it to work on Windows and Mac.

For the last (quite a few) months, I've not felt like doing any programming especially Ada. I've only come back here to comment after some time away from here to point out some facts to you. So, sorry my situation has got in the way of you using something I don't get paid to work on.

Lucretia avatar Oct 09 '23 13:10 Lucretia

because you don't seem to have bothered to find out.

You seem to have weird expectations of people who really only came to install a library. If it's relevant for the software, make it apparent here.

I never thought Github was for blogging but if this gives me any sort of credibility in your eyes: I moved away from antidepressants earlier this year, then my grandma died while I was changing workplaces, which prompted my mother to move to her dad so I suddenly found myself pretty much alone in a new life situation and this was about my life when I wrote that comment. I've been having panic attacks during the day even at home recently, and I've waken up to feeling my consciousness falling to pieces, trying to formulate sentences in my head just to somehow convince myself that I'm not completely losing my mind.

So there you have it. One can, and I think clearly should, put these things aside when participating in FOSS development.

I don't want to spill fuel on the fire but I have technical objections as well. Let me just say that I think the whole FOSS "business" is rather an escape route where one can feel useful, pleasing themselves and often others as well, not a place to dump personal problems, like it was something nice to share with strangers.

2colours avatar Oct 10 '23 13:10 2colours