Hello all,
New to Ada, using the alr raylib crate and below is the project details and first few errors. Compile is failing on compilation of raygui_impl.c. Error message lists off a bunch of libc headers that are missing. Any thoughts. RESOLVED SEE BELOW
Compile
[C] raygui_impl.c
[Ada] raylib_config.ads
[Ada] raylib.adb
[Ada] raylib-gui.adb
In file included from /Users/rxxxx/.local/share/alire/builds/raylib_1.0.1_0fd26c4b/72e1c3082ed09f18677fef6a763cdd570759da3eeca975ae3253077f73cb210b/raygui/src/raygui.h:1030,
from /Users/xxxxx/.local/share/alire/builds/raylib_1.0.1_0fd26c4b/72e1c3082ed09f18677fef6a763cdd570759da3eeca975ae3253077f73cb210b/src/raygui_impl.c:2:
/Users/roninxv/.local/share/alire/toolchains/gnat_native_14.2.1_cc5517d6/lib/gcc/aarch64-apple-darwin23.6.0/14.2.0/include-fixed/stdio.h:83:8: error: unknown type name ‘FILE’
83 | extern FILE *__stdinp;
hello_raylib ➤ cat alire.toml
name = “hello_raylib”
description = “”
version = “0.1.0-dev”
authors = [“j”]
maintainers = [“j example@example.com”]
licenses = “MIT OR Apache-2.0 WITH LLVM-exception”
website = “”
tags =
[[depends-on]]
raylib = “^1.0.1”
Found the issue i think, on the Ada know n issues page in the getting started area. So, installed command line tools 15.3. Now my project compiles, but fails to link. Error below :
Undefined symbols for architecture arm64:
“_LoadImageSvg”, referenced from:
_raylib__loadimagesvg__2 in libRaylibAda.a(raylib.o)
ld: symbol(s) not found for architecture arm64
collect2: error: ld returned 1 exit status
gprbuild: link of hello_raylib.adb failed
RESOLVED
What a journey this has been. lol Quite the learning experience. So after fixing my compiler by installing SDK 15.3 command line tools, I then figured out where ALR was keeping the raylib.adb and raylib.ads files and edited them to remove the offending loadImageSVG references from those files and now my project compiles and runs as expected.
Also, upon further research its seems the raylib functions have been deprecated do to compatibility issues. see link No implementation of `LoadImageSvg` · Issue #485 · gen2brain/raylib-go · GitHub.
Hope this helps someone as this was kind of an odd platform issue. I think I will go ahead and submit a pull request to fix, but not sure how to handle older versions of raylib that use the loadImageSVG functions. I’m like brand-new to the language and figuring out how all this works. Just trying to help