2
votes

Step 9 of the GPS tutorial states

It is now time to run the application: select the menu Build->Run->sdc, which
will open a dialog window.  In the text input field (selected by default),
press the right arrow key and then insert input.txt: this is the name of a
text file that will be passed as argument to the sdc program.

The text input should now read: %E input.txt and the full command that will be executed is displayed underneath: .../gps/tutorial/obj/sdc input.txt

In actuality, doing this produces an error:

gprbuild: "c:\gnat\2015\share\examples\gps\tutorial\obj\sdc" is not a source of any project.

What is the syntax for passing command-line arguments for the built executable?

I tried various combinations of macros and parameters to gprbuild. The default by following the instructions is %builder -d %eL -P%PP %X %T %E input.txt. I made sure "input.txt" existed in the directory %E refers to. I can run sdc input.txt on the command line and that works fine.

1
Does Shift-F2 work? (I just tried Build > Run > {program} here, GPS GPL 2015, worked as advertised)Simon Wright
Shift-F2 does work! And now the menu option Build > Run > {program} has "Shift+F2" next to it as a hint, and works like Shift-F2, with no macros filled in. (I did try it with no macros before, just "%E input.txt", it did not work then. Now it does.)Noumenon

1 Answers

0
votes

You are apparently running a "build" command (via gprbuild), and not running the "sdc" executable itself. I guess you selected the wrong menu.