I have Gnat Studio but I can't do anything at all unless I create a Project (whatever that is). Even then, I can't write and run Hello_World unless I call it Main. The concept of an IDE where I can step through a program checking changes in variablevalues as I go seems to have vanished.
In short, I am lost and I can't find any material to help me find my way.
On 2022-09-26 08:20, Rick Duley wrote:values as I go seems to have vanished.
I have Gnat Studio but I can't do anything at all unless I create a Project (whatever that is). Even then, I can't write and run Hello_World unless I call it Main. The concept of an IDE where I can step through a program checking changes in variable
That concept is called debugger. GDB for GCC (GNAT Ada is based in GDB).
GDB never ever really worked except for little exercises. It still does
not. So, forget about it.
In short, I am lost and I can't find any material to help me find my way.The project file is 3-liner:
----------------hello_world.gpr----->
project Hello_World is
for Main use ("hello_world.adb");
end Hello_World;
<------------------------------------
No, you do not need main to be Main:
---hello_world.adb----------------->
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello_World is
begin
Put_Line ("Hello world!");
end Hello_World;
<----------------------------------
You still can compile and build without projects. But projects are much
more comfortable.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
That concept is called debugger. GDB for GCC (GNAT Ada is based in
GDB). GDB never ever really worked except for little exercises. It
still does not. So, forget about it.
Until you get to programs with a lot of tasking and/or interrupts, most
are "little exercises". Do not forget about using a debugger (and, realistically, GDB is it for GNAT).
I want to get back to doing some Ada programming and I am suddenly confronted with a whole new new Adaverse. I suppose that has something to do with my not even looking at an Ada program for some twenty years! 😖 I have Gnat Studio but I can't doanything at all unless I create a Project (whatever that is). Even then, I can't write and run Hello_World unless I call it Main. The concept of an IDE where I can step through a program checking changes in variable values as I go seems to have
I'd appreciate some help. Perhaps there is a forum I cannot find for beginner Ada programmers. Perhaps there is a tutorial or a text I can download. Everything I can find is written for people with CS Degrees that are not 30 years old and whoalready know everything about this new world. What I really need, I think, is _*Ada Programming in Gnat Studio for Dummies*_. 😖
You missed the point, Dmitry. Showing me the code for Hello_World does not show me how to create the program using Gnat Studio.
Firstly, I do not understand the concept of a _Project_.
Until a couple of days ago I had never heard the term in reference to Ada Programming.
Secondly, I can write Hello_World.adb and have it included in my 'Project', I can even build it, but the only thing that will run is _Main_.
I cannot find any documentation about Studio which explains something as simple as the creation of Hello_World.exe. Can you do that in Studio or is it purely ornamental?
Thirdly, I was never a good enough programmer to be able to write programs without bugs. Perhaps you have reached that exalted stage but I certainly have not. Therefore I have a need to debug. How do I do that?
That concept is called debugger. GDB for GCC (GNAT Ada is based in
GDB). GDB never ever really worked except for little exercises. It
still does not. So, forget about it.
Firstly, I do not understand the concept of a _Project_. Until a
couple of days ago I had never heard the term in reference to Ada Programming. Everyone seems to assume that I know what it means, but
I don't.
You can start GNAT Studio with a "default project". This lets you use it as an LSE.
Okay - you can use GDB within Studio. Great, but first I have to write a program.Gnat Studio installed.
Please ...
Assume: I am an Elementary School kid brought up by his Grandparents who are still struggling to control an abacus. Assume I know absolutely nothing at all about programming. Assume that I do not speak Geek! Assume that there is access to a PC with
Now: Teach me how to write "Hello_World" using Studio from scratch right up to where I have 'hello_world.exe' and can run it. That'll be great! Then I'll have something to tell Grandma about. :)
I want to get back to doing some Ada programming and I am suddenly confronted with a whole new new Adaverse. I suppose that has something to do with my not even looking at an Ada program for some twenty years! 😖 I have Gnat Studio but I can't doanything at all unless I create a Project (whatever that is). Even then, I can't write and run Hello_World unless I call it Main. The concept of an IDE where I can step through a program checking changes in variable values as I go seems to have
On Monday, September 26, 2022 at 5:30:14 PM UTC+8, Jeffrey R.Carter wrote:
You can start GNAT Studio with a "default project". This lets you use it as an LSE.
What is an LSE?
You might also find that the new alire way
will easily give you what you want but maybe
also more than you want.
You can get a hello world open in gnat studio
with two? commands though.
"https://alire.ada.dev/docs/#first-steps"
I want to get back to doing some Ada programming and I am suddenly confronted with a whole new new Adaverse...
1. Start GPS
2. Select default project
For myself, I have two more questions:
1. Do I have to create a new project for every mainline I write?
2. My program runs in Studio but the EXE does nothing from the folder.
For myself, I have two more questions:
1. Do I have to create a new project for every mainline I write?
You might also find that the new alire wayFollowing the "first-steps", progress succeeded up to gnat_native=11.2.4 installed successfully but then failure:
will easily give you what you want but maybe
also more than you want.
You can get a hello world open in gnat studio
with two? commands though.
"https://alire.ada.dev/docs/#first-steps"
On Monday, September 26, 2022 at 11:23:35 PM UTC+10, kevc...@gmail.com wrote:
You might also find that the new alire way
will easily give you what you want but maybe
also more than you want.
You can get a hello world open in gnat studio
with two? commands though.
"https://alire.ada.dev/docs/#first-steps"Following the "first-steps", progress succeeded up to gnat_native=11.2.4 installed successfully but then failure:
dyld: lazy symbol binding failed: Symbol not found: ___darwin_check_fd_set_overflow
Any ideas on how to fix this:
Thanks,
Roger
On Monday, September 26, 2022 at 11:23:35 PM UTC+10, kevc...@gmail.com wrote:
You can get a hello world open in gnat studioFollowing the "first-steps", progress succeeded up to
with two? commands though.
"https://alire.ada.dev/docs/#first-steps"
gnat_native=11.2.4 installed successfully but then failure:
dyld: lazy symbol binding failed: Symbol not found: ___darwin_check_fd_set_overflow
Any ideas on how to fix this:
Thanks,
Roger
For myself, I have two more questions:
1. Do I have to create a new project for every mainline I write?
Roger Mc <roge...@gmail.com> writes:
On Monday, September 26, 2022 at 11:23:35 PM UTC+10, kevc...@gmail.com wrote:I tried this on my mid-2012 Macbook Pro running 10.11.6 (El Capitan),
You can get a hello world open in gnat studioFollowing the "first-steps", progress succeeded up to
with two? commands though.
"https://alire.ada.dev/docs/#first-steps"
gnat_native=11.2.4 installed successfully but then failure:
dyld: lazy symbol binding failed: Symbol not found: ___darwin_check_fd_set_overflow
Any ideas on how to fix this:
Thanks,
Roger
the problem arises when running gprconfig (all the Alire-provided
releases were built against a later Xcode (Google suggests 11.4 or
later??) which does provide this symbol). I dare say it'd happen running
the compiler too.
Only suggestion: install one of my builds, set it on your PATH, run alr toolchain --select & choose the 'gnat_external' line for the
compiler. Alire then chooses a compatible gprbuild.
11.2.0 at Github: https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-11.2.0-native
Or 12.1.0 from Github: https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-12.1.0-x86_64
Only suggestion: install one of my builds, set it on your PATH, run alr
toolchain --select & choose the 'gnat_external' line for the
compiler. Alire then chooses a compatible gprbuild.
11.2.0 at Github:
https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-11.2.0-native
Or 12.1.0 from Github:
https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-12.1.0-x86_64
Thanks Simon
I cloned 12.1.0 from Github then tried .doinstall in the native directory.
It gets to Do you want to proceed with installation but when I respond
with Y nothing happens.
Roger Mc <roge...@gmail.com> writes:Many thanks, much appreciated
Only suggestion: install one of my builds, set it on your PATH, run alr
toolchain --select & choose the 'gnat_external' line for the
compiler. Alire then chooses a compatible gprbuild.
11.2.0 at Github:
https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-11.2.0-native
Or 12.1.0 from Github:
https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-12.1.0-x86_64
Thanks SimonI don't understand what you've done, at all. "cloned"? ".doinstall"?
I cloned 12.1.0 from Github then tried .doinstall in the native directory. It gets to Do you want to proceed with installation but when I respond
with Y nothing happens.
"native directory"?
I see that the README at the link above (in fact like most of my
READMEs) might be thought to be less than clear; perhaps the very first
thing should be the Install section. It says
Download the binary .pkg. It's not signed, so don't double-click on
it; instead, right-click on it and Open. Accept the warning. You will
be guided through the installation.
It should also say that "the binary .pkg" is to be found by scrolling to
the bottom of the page.
On Wednesday, September 28, 2022 at 6:26:40 AM UTC+10, Simon Wright wrote:
Roger Mc <roge...@gmail.com> writes:
Only suggestion: install one of my builds, set it on your PATH, run alr >> toolchain --select & choose the 'gnat_external' line for the
compiler. Alire then chooses a compatible gprbuild.
11.2.0 at Github:
https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-11.2.0-native
Or 12.1.0 from Github:
https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-12.1.0-x86_64
Thanks SimonI don't understand what you've done, at all. "cloned"? ".doinstall"? "native directory"?
I cloned 12.1.0 from Github then tried .doinstall in the native directory.
It gets to Do you want to proceed with installation but when I respond with Y nothing happens.
I see that the README at the link above (in fact like most of my
READMEs) might be thought to be less than clear; perhaps the very first thing should be the Install section. It says
Download the binary .pkg. It's not signed, so don't double-click on
it; instead, right-click on it and Open. Accept the warning. You will
be guided through the installation.
It should also say that "the binary .pkg" is to be found by scrolling to the bottom of the page.Many thanks, much appreciated
I confused the issue as I'm only used to downloading programs from git's " code" page.
I had no problems following your instructions above which resulted in an easy installation.
I'm currently using the 2019 version of gps for development but am investigating alr.
On 2022-09-26 08:20, Rick Duley wrote:
I have Gnat Studio but I can't do anything at all unless I create a
Project (whatever that is). Even then, I can't write and run
Hello_World unless I call it Main. The concept of an IDE where I can
step through a program checking changes in variable values as I go
seems to have vanished.
That concept is called debugger. GDB for GCC (GNAT Ada is based in
GDB). GDB never ever really worked except for little exercises. It
still does not. So, forget about it.
way.In short, I am lost and I can't find any material to help me find my
On 2022-09-26 11:34, Rick Duley wrote:
On Monday, September 26, 2022 at 5:30:14 PM UTC+8, Jeffrey R.Carter wrote: >>>
You can start GNAT Studio with a "default project". This lets you use it as an LSE.What is an LSE?
Sorry: Language-Sensitive Editor
On 2022-09-26 09:11, Rick Duley wrote:
You missed the point, Dmitry. Showing me the code for Hello_World
does not show me how to create the program using Gnat Studio.
Hmm, programs are created by typing them in an editor...
Firstly, I do not understand the concept of a _Project_.
Project is an executable or shared/static library.
Until a couple of days ago I had never heard the term in reference to Ada Programming.
It always existed. E.g. Ada 83 Reference Manual called it "the program library". See ARM 83 (10.4)
Secondly, I can write Hello_World.adb and have it included in my
'Project', I can even build it, but the only thing that will run is
_Main_.
No, I provided the project file where the main procedure is called Hello_World.
I cannot find any documentation about Studio which explains
something as simple as the creation of Hello_World.exe. Can you do
that in Studio or is it purely ornamental?
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
On 2022-09-26 09:11, Rick Duley wrote:
Until a couple of days ago I had never heard the term in reference to Ada Programming.
It always existed. E.g. Ada 83 Reference Manual called it "the program
library". See ARM 83 (10.4)
Which is literally not "project", although it is a similar concept.
"Project" is now a common term in many software tools.
Back in late 90's ObjecAda had projects. The project file had extension literally *.prj....and still has, by the way :-).
Until a couple of days ago I had never heard the term in reference to Ada Programming.
It always existed. E.g. Ada 83 Reference Manual called it "the program
library". See ARM 83 (10.4)
Which is literally not "project", although it is a similar concept.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 399 |
Nodes: | 16 (3 / 13) |
Uptime: | 64:49:00 |
Calls: | 8,355 |
Calls today: | 15 |
Files: | 13,159 |
Messages: | 5,893,946 |
Posted today: | 1 |