comp.lang.ada
 help / color / mirror / Atom feed
From: "Lucretia" <lucretia9@lycos.co.uk>
Subject: Re: GNAT, shared libraries, building in different directories...madness!
Date: 14 Oct 2006 12:13:14 -0700
Date: 2006-10-14T12:13:14-07:00	[thread overview]
Message-ID: <1160853194.025616.271150@b28g2000cwb.googlegroups.com> (raw)
In-Reply-To: 87lko19qjw.fsf@ludovic-brenta.org

Ludovic Brenta wrote:
> project Build_Adael is
>    Compiler := External ("COMPILER", "gnat");

This isn't needed as gnat *will* be the compiler if using gpr files, so
this can be hardcoded.

>    Target   := External ("TARGET", "linux");
>    Build    := External ("BUILD", "release");
>
>    for Source_Dirs use ("src/adael",
>                         "src/common",
>                         "src/generic",
>                         "src/gtk2",
>                         "src/" & Target);

And there is a major problem with this source directory directive. The
generic directory should contain all source for a gui toolkit neutral
UI, in a way that wxWidgets does currently. I.e. say that I have a UI
element called Some_Gizmo (which does something), on Win32 there exists
a native implementation that can be wrapped by AdaEL, GTK+-2.x might
not have this and so uses the one from the generic directory. When
compiling under MingW32 the compiler is going to have a problem as
there will be 2 packages called some_gizmos.ad[sb], 1 in src/generic
and 1 in src/win32. So, how do I know which to compile? Now only GNAT
can use the package renaming pragmas and only GNAT provides Ada 2005,
but other compilers will catch up and it would be nice to be able to
say that this library will compile with any Ada 2005 capable compiler.

[massive snip - this bit made sense ;-)]

> I think you *could* do away with GNAT project files, but that way lies
> madness.

I think the way that GNAT does things is just wierd, especially when
attempting to use it for complex projects like this.

Thanks,
Luke.




  parent reply	other threads:[~2006-10-14 19:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-28 18:54 GNAT, shared libraries, building in different directories...madness! Lucretia
2006-09-30  6:30 ` vgodunko
2006-09-30 18:07 ` Ludovic Brenta
2006-10-01 14:44   ` sphinxmoro
2006-10-01 15:41     ` Simon Wright
2006-10-01 16:28       ` Ludovic Brenta
2006-10-05 12:22   ` Philippe Bertin
2006-10-05 12:33     ` Ludovic Brenta
2006-10-05 15:28       ` Philippe Bertin
2006-10-05 16:06         ` Alex R. Mosteo
2006-10-05 20:22         ` Ludovic Brenta
2006-10-07  8:21           ` Simon Wright
2006-10-14 19:13   ` Lucretia [this message]
2006-10-15 11:00     ` Simon Wright
  -- strict thread matches above, loose matches on Subject: below --
2006-09-28 19:11 Lucretia
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox