Friday, March 27, 2009

A riveting post about compiling my first Ada program

A riveting post about compiling my first Ada program. About two weeks ago I decided I wanted to write a hello world program in the Ada computer programming language. I already had mingw installed on my computer so all I needed to install was gnat, the Ada compiler.

So I installed gnat on my computer and then went to the Ada programming wikibook and copied the hello world program. I saved the file and tried to compile the program, it would not compile. I got a message saying the Ada compiler was not installed on my computer at the command prompt. So I thought I am sure I installed the Ada compiler what do I do now.

I decided to reinstall mingw and the gnat compiler which I did, but after the reinstall I still got the message that the Ada compiler was not installed on my computer, I was not feeling to good at this point. It took me a while, but I figured out that I needed to set the path manually at the command prompt.

After getting the path set right I need to figure out what command to give the compiler to have it make an executable because compile did not make an executable. I used compile and then after the program was compiled I tried the command link, but that did not work. Then I tried make and what do you know it worked. I typed hello at the command prompt and it said hello world.

No comments:

Post a Comment