I decided to learn how to program with Ada language .. if any one can advise me which compiler that I have to use ?? there are many of them .. but i havn't any knowledge about

Dani AI

Generated

already has solid experience, so here is a compact, practical path to get Ada working and avoid the common setup traps mentioned earlier by , and .

Ada basics and a first compile
Create a file named hello.adb with this content:

with Ada.Text_IO; use Ada.Text_IO;

procedure Hello is
begin
   Put_Line("Hello, Ada!");
end Hello;

From a shell run gnatmake hello.adb. That single command compiles, binds and links; it produces an executable (hello or hello.exe). File extensions: .ads for specs (interfaces) and .adb for bodies.

Practical troubleshooting and tips

  • If gnatmake is not found, confirm the Ada toolchain is installed and its bin folder is on PATH.
  • Compile errors usually come from missing with clauses, wrong file names, or mismatched spec/body names. Link-time errors usually mean a missing object or wrong project layout.
  • For multi-file projects use gnatmake main.adb or an Ada project file; gnatmake handles dependency order automatically.
  • Beware of case where an editor saves files with hidden extensions (Windows) or wrong encoding; Ada source should be plain UTF-8/ASCII without BOM.

Editor/IDE and next steps
Use a simple editor with Ada support (GNAT Studio/GPS, Emacs ada-mode, Vim Ada plugins, or an Ada extension for VS Code) for syntax checking and indentation. Explore Ada features that differ from C#/Java: strong typing and package specs, tasking (concurrency), protected objects, generics, and contract-style checks (pre/post conditions). For higher-assurance work, look into the SPARK subset.

This set of steps should get a working compile/run quickly and make it easier to diagnose any specific errors from an unfamiliar front end like AdaGuide.

Recommended Answers

All 5 Replies

Start with just about any other language. I suggest Python, or if you want a GUI, vb.net or C#.net.

That's a blast from the past. While I did have a reason to know Ada that was over 2 decades ago. Unless your job depends on it, I'd supply a little more about what you want to write, if it has a GUI or is it Web based and more.

Oh am already writing with C# , C++ ,java and little Python .. i just wanna do this for fun and knowing new language .. i found Compiler called AdaGuide but am stuck within , i think because it's not fimiliar

FWIW, the Oracle embedded PL/SQL software is a derivative of Ada. It (Ada) was developed by the US Government - our tax dollars at work! The Gnu Ada compiler is probably the best bet - available on Source Forge, it has versions for most every operating system. Here is a link: https://sourceforge.net/projects/gnuada/

Most linux systems have Ada in their standard repositories. It is called gcc-gnat, and there is a GUI front end for it as well called GtkAda.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.