Re: GNAT Programming System Problems

From: Martin Krischik (krischik_at_users.sourceforge.net)
Date: 06/22/04


Date: Tue, 22 Jun 2004 08:06:18 +0200

C. Leif wrote:

> After much time and effort, I have been able to compile a program with the
> GNAT Programming System. Initially, when I created a project, the files
> would neither compile nor even check syntax. I received a message,
>
> "pretty_printer" is not an allowed package name
> warning: undefined attribute "default_switches"
>
> This problem was eliminated by commenting out information on the pretty
> printer in the .gpr file.

The pretty printer is only available to newer GNATs. Personally I think this
is a design mistake. Unknown packages should have been a warning not an
error.

> For each of my Ada Utilities, I created its own project. Since in each
> utility there are packages (mostly bodies) that depend on packages in
> another utility, there are circular dependencies amongst the .gpr files.
> Fortunately, these do not exist in the specifications. After extensive
> searching, I found mention of a "limited with construct". The addition of
> limited before with in the project file did not work.

In which case you might consider a library package. Just create a package
with the shared packages and add:

    Version := "1.0.0";
    for Library_Name use "adacl";

   case Style is
      when "Release" =>
         for Library_Kind use "dynamic";
         for Library_Version use "libmylib.so." & Version;
      when "Debug" =>
         for Library_Kind use "static";
         for Library_Version use "libmylib.a." & Version;
   end case;

and remove the

    for Main ...
    for Executable ...

statements.

> Obviously, I would greatly appreciate help. I also should state that I
> have
> described one of the reasons for the Ada's lack of popularity. Microsoft
> and other software manufacturers have demonstrated that for the customer
> the ease of use of the environment can outweigh the comparative lack of
> quality
> of the compiler. I was hopping that the development of A# would result in
> a commercial quality compiler that could be hosted, as many other
> languages
> have been, under Microsoft Visual Studio. The traditional Ada compiler
> vendors might extend their J code generators to produce the ECMA
> intermediate language employed by Microsoft.

Remember: you are using the free academic version! GNAT Pro comes with
pretty printer, the newest GPS, and support.

With Regards

Martin

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com


Relevant Pages

  • The GNU Ada compiler
    ... I have finally managed to take over the "The GNU Ada compiler" project. ... project will supply community compiled binary packages of the GNAT ... Currently there is only a very old GNAT for DOS available. ... rpm based Linux system you can just download the RPM kit (as rpm or via ...
    (comp.lang.ada)
  • Re: The Computer Language Shootout Benchmarks
    ... Tapio Kelloniemi wrote: ... Since the compiler is most likely GNAT, ... GNAT.HTable packages. ...
    (comp.lang.ada)
  • Re: Manifesto against Vector
    ... >> Well, call me old school or so, but most of the times the only IDE I ... It tells me, what I am using, it tells the compiler what I am going to ... >> No, not exactly, we're talking about different packages here. ... renaming A to B does not create any new package. ...
    (comp.lang.ada)
  • Re: Next Ada compiler for Debian: the votes so far
    ... The Debian changelog is specific to each package, ... AdaCore has not "gone proprietary", GNAT is, remains and will always ... > a compiler remained free). ... just not been provided to those who want to do proprietary software. ...
    (comp.lang.ada)
  • Re: GNAT verses A# for soft-realtime system
    ... I have a choice of GNAT or A# for my programming environment. ... Whether you go with a supported compiler, or with a free version of GNAT ... version of Ada you want to use. ... Do the additional features of 2005 target real-time systems? ...
    (comp.lang.ada)