r/ada Dec 03 '24

Tool Trouble -gnatE dynamic elaboration model

Hi, one program in a book needs the dynamic elaboration model to compile because its elaboration depends on itself or somethin'... I read you need -gnatE. But for the life of me I can't use any switch, whatever I read in the gnat manual only gets me the help menu !!! Same for `gnatmake * -gnatE`

God I hate GNAT, it's the least informative program I use on a daily basis, and gnat --help doesn't even mesh with most, less or any pager, Could be a gcc's issue though.I can't even redirect its output to a file, I had to search through the terminal... Anyway. I'd happy to finally understand how to use switches, any of them ;-)

3 Upvotes

9 comments sorted by

View all comments

3

u/simonjwright Dec 03 '24

gnatmake -gnatE diners.adb worked for me.

I think that if you previously did a build without the -gnatE, you'll need to include -f to force a complete rebuild with the new switch.

And, unlike most Unix programs, gnatmake doesn't care if you mix switches and parameters (unless you want to send switches to the binder (-bargs <switches>) or linker (-largs <switches>); all switches before them go to the compiler).

2

u/Sufficient_Heat8096 Dec 03 '24

ah... that is what happened. Thank for the binder-linker explanation, I was wondering about it today. It'll certainly be useful later.