开发者

How to Run Ada Code in GPS

开发者 https://www.devze.com 2023-04-02 19:21 出处:网络
In GNAT Programming Studio, how do you run the program? I开发者_运维技巧 see it compiled successfully, but I do not see where my program has started running. I would like to test it.First, you have to

In GNAT Programming Studio, how do you run the program? I开发者_运维技巧 see it compiled successfully, but I do not see where my program has started running. I would like to test it.


First, you have to select your Main procedure in the project properties (see the "main files" tab). You can actually choose multiple files for multiple executables.

Next, you have to build it - either by pressing F4 for the first Main File in the list, or by choosing it in the Build->Project submenu, or by choosing "build all" in the Build->Project submenu (or use the toolbar for the menu entries).

Last, you can choose, which of your Main Files to run by choosing it in the Build->Run menu, or by pressing shift+F2 for the first file in the list. Enter the parameters in the dialog and press OK.

There should be a new Tab next to the Messages panel, where all output is placed, and you can use it for input, too. You could choose to use an external terminal in the run dialog.

If you want to debug it, have a look at the Debug menu. Read the documentation for more information.


Last, you can choose, which of your Main Files to run by choosing it in the Build->Run menu, or by pressing shift+F2 for the first file in the list. Enter the parameters in the dialog and press OK.

Whatever I enter here, e.g. either the name of the project, Primes_Count or the name of what I see to be the 'executable', Primes_Count.o, it just does not run.

And I get this message output on the Messages window :

Could not locate executable on path: Primes_Count.o

I don't see why Ada is making such a big deal out of the Run step.

If there is another stage between making the .o file and a finished Ada executable, then surely it is something that the GPS system can take care of itself . . .

December.

OK now, sorted. The GPS panel governing this [ Project menu > Edit Proj Props > Main Files tab ] setting was blacked out until clicked. Running available now and working well.


it is Project->Properties-> Main Files add your file to run. This will sort out the issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消