How to run Ada code in GPS

In the GNAT programming program, how do you run the program? I see that it compiled successfully, but I don’t see where my program is running. I would like to check it out.

+4
source share
3 answers

First you must select the main procedure in the project properties (see the tab "Main files"). You can select multiple files for multiple executable files.

Then you must create it - either by pressing F4 for the first main file in the list, or by selecting it in the Build-> Project submenu, or by selecting "build all" in the Build-> Project submenu (or use the toolbar for menu entries).

Finally, you can choose which of the main files to execute by selecting it in the Build-> Run menu or by pressing shift + F2 for the first file in the list. Enter the options in the dialog box and click OK.

Next to the Messages panel, there should be a new tab where the entire output is located, and you can also use it for input. You can use an external terminal in the run dialog.

If you want to debug it, see the Debug menu. Read the documentation for more details.

+8
source

Finally, you can choose which of the main files to execute by selecting it in the Build-> Run menu or by pressing shift + F2 for the first file in the list. Enter the options in the dialog box and click OK.

Whatever I introduce here, for example. either the name of the Primes_Count project, or the name of what I see as an "executable file", Primes_Count.o , it just does not start.

And I get this message in the Messages window:

Could not find executable file on path: Primes_Count.o

I don’t understand why Ada makes such a big deal from the Run step.

If there is another step between creating the .o file and the finished Ada executable, then of course it is that the GPS system can take care of itself.,.

December.

OK is now sorted. The GPS panel that controls this menu [Project menu> Edit Proj Props> Main Files tab] has been darkened until it clicks. It works now and works well.

+1
source

this is Project-> Properties-> Main Files so that your file is launched. This will solve the problem.

0
source

All Articles