Hi;
I’m still struggling to re-learn Ada after an approximately forty years of learning it the first time in college.
I’ve gone through a great deal of the AdaCore Learning Ada web site.
I’ve tried using Alire prior to the new 2.x release and got really frustated and gave up.
I tried using Alire 2.x a couple of times after the release announcement and made a little more progress, but still frustrated.
So I’ve been spot-reading John Barness Ada 2012 (preview of 2022) book and looking at the Ada examples on Rosetta Code.
Almost every time that a Rosetta Code Task uses an external package, I run into problems.
I still don’t understand building with GPR, I just just gnatmake directly.
I use Simon Wright’s release of gcc-13.2.0-aarch64 on my Mac (Apple Silicon) and add -Lpath to gnatmake where the path is my local download of the external package source. [Thank you, Simon!]
In this case, it is the simple_components package.
Attempting this in Alire failed (thee simple_components are in the Alire index); so I fail to properly understand how to use Alire, I guess.
Attempting this with gnatmake using the -L/path also fails.
So I have some fundamental failures to understand how to use Ada in non-trivial examples.
Here is a recent attempt:
/opt/gcc-13.2.0-aarch64/bin/gnatmake -L/opt/ext_ada_lib/simple_components/ ./test_simple_parser.adb
gcc -c -I./ -I- ./test_simple_parser.adb
test_simple_parser.adb:3:06: error: file “parsers.ads” not found
test_simple_parser.adb:4:06: error: file “parsers.ads” not found
test_simple_parser.adb:5:06: error: file “strings_edit.ads” not found
test_simple_parser.adb:6:06: error: file “parsers.ads” not found
gnatmake: “./test_simple_parser.adb” compilation error
I’ve been told (moe than once) that using gnatmake for non-trivial things is hard to get right. I really have tried to understand GPR, but I just don’t get it.
Simple questions:
if an Ada with clause contains a period, that implies a directory?
Do I need multiple -L options on the call gnatmake?
Am I too old and/or too dumb to use Ada for non-trivial coding?
Thanks,
Retired Build Engineer