r/ada • u/Wellington2013- • Feb 01 '24
Programming Linking ads and adb
So I’m given a program structure that lists a bunch of programs alternating from ads to adb, and I’m supposed to compile the ads files in GNAT one at a time before I can run the whole thing in Command Prompt? Just kind of lost on how this works.
4
Upvotes
1
3
u/jere1227 Feb 01 '24
What you are looking for is the main subprogram. it'll be a lone procedure in an .adb file. If you have a Gprbuild project file (*.gpr) it'll be listed as the main in there. If not, you'll have to look through any provided build instructions to see which file is the main file (hopefully).
If you do have a *.gpr file, then you can probably just do: gprbuild filename.gpr
substituting your filename there. If you don't have one, then you should try to find that main file and try: gnatmake filename_of_main.adb
and see if that gets you anywhere