I have not kept up with Ada for sometime. I was wondering, if someone wants
to develop a simple GUI (plots, menus, buttons, graphs, etc..) using Ada,
and have the code compile to a .exe on windows and linux, which is the
current most popular software pieces needed for the GUI?
Assuming I will be using GNAT. Which gcc version should I be using these
days which has the latest Ada support in it? Should I be using gcc directly
for Ada programming these days, or use GNAT GPL 2009 version from Libre web
site http://libre.adacore.com/libre/ ?
I know there are few choices for the GUI, and just wanted to check what is
the "best" choice do you think for that. One with a GUI builder would be
nice (i.e. where one can pick the components and lay them out to design the
interface). This will be an school program, nothing commercial. I wanted to
try to write some basic finite element code in Ada, but need a GUI part for
the simulation part.
Thanks,
--Nasser
> I have not kept up with Ada for sometime. I was wondering, if someone wants
> to develop a simple GUI (plots, menus, buttons, graphs, etc..) using Ada,
> and have the code compile to a .exe on windows and linux, which is the
> current most popular software pieces needed for the GUI?
I guess that among portable frameworks the most popular ones with Ada
bindings are Gtk, Qt.
> Assuming I will be using GNAT. Which gcc version should I be using these
> days which has the latest Ada support in it? Should I be using gcc directly
> for Ada programming these days, or use GNAT GPL 2009 version from Libre web
> site http://libre.adacore.com/libre/ ?
AFAIK, for GtkAda either would go.
> I know there are few choices for the GUI, and just wanted to check what is
> the "best" choice do you think for that. One with a GUI builder would be
> nice (i.e. where one can pick the components and lay them out to design the
> interface). This will be an school program, nothing commercial. I wanted to
> try to write some basic finite element code in Ada, but need a GUI part for
> the simulation part.
As for Gtk, it has such a tool GLADE. I am using Gtk for a long time, but I
never felt any desire or necessity to use GLADE. I prefer to go rather OO,
designing custom widgets derived from Gtk containers, which is fairly
simple in Gtk (while many other things, trivial in other GUI frameworks are
unnecessary difficult in Gtk).
Gtk has a widget sizing model somewhat similar to TeX, this is an approach
in its core opposite to the GUI design tool. Imagine a text editor, in
which you would move each word of the text around paper in a way the sorts
were used in typesetting? Admittedly a design tool gives you some
approximate result quicker. But it is never good and never scalable.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Thanks Dmitry;
I know now gcc supports GNAT ada. If I use gcc directly, instead of GPL GNAT
2009 edition, would I be losing any features? I am a bit confused why there
are different GNAT versions around. The reason if would prefer gcc is that
gcc is more likely to be installed on all Linux systems than GNAT itself, so
if someone wants to compile the code, they would not have to download GNAT
first, or is my thinking wrong on this? If I were to develope Ada code in
GNAT, then may be it will not compile with gcc due to some features not
being the same? I need to catch up on Ada, been a while...
I'll look at GTK for the GUI.
--Nasser
Thanks Vadim for the info; I will look at Qt also. I always find a GUI
builder easier to use to layout components than doing that using just code.
Much less time, but may be not as flexible, but the time saving is worth it
for me.
--Nasser
Jerry
Shameless_Plug: begin
Besides the respective merits of GTK+, Qt and their Ada bindings, you
may find that ease of installation and deployment are also of
importance. By that metric, I suggest you take a look at Debian GNU/
Linux 5.0 "Lenny", the stable distribution. It ships GCC 4.3 and
GtkAda 2.8.1 as packages, i.e. precompiled and preconfigured for
immediate use, along with a host of other Ada libraries. Beware
though: you may get spoiled with the ease of use and never want to go
back to Windows :) The installation is as easy as:
aptitude install libgtkada2-dev
which will also pull the correct version of GCC and any other packages
necessary.
If you feel adventurous, you may want to try the testing distribution;
it has GtkAda 2.12.0. I am planning to upload GtkAda 2.14.2 to
unstable in the next couple of weeks; it should reach testing by the
end of January.
end Shameless_Plug;
--
Ludovic Brenta.
You can try Visual Ada Developer VAD 7.3 http://users1.jabry.com/adastudio/index.html
Leonid (leonid...@yahoo.co.uk)
> Nasser M. Abbasi wrote on comp.lang.ada:
>>
>> I have not kept up with Ada for sometime. I was wondering, if someone wants
>> to develop a simple GUI (plots, menus, buttons, graphs, etc..) using Ada,
>> and have the code compile to a .exe on windows and linux, which is the
>> current most popular software pieces needed for the GUI?
>>
>> Assuming I will be using GNAT. Which gcc version should I be using these
>> days which has the latest Ada support in it? Should I be using gcc directly
>> for Ada programming these days, or use GNAT GPL 2009 version from Libre web
>> sitehttp://libre.adacore.com/libre/?
>>
>> I know there are few choices for the GUI, and just wanted to check what is
>> the "best" choice do you think for that. �One with a GUI builder would be
>> nice (i.e. where one can pick the components and lay them out to design the
>> interface). This will be an school program, nothing commercial. I wanted to
>> try to write some basic finite element code in Ada, but need a GUI part for
>> the simulation part.
>
> Shameless_Plug: begin
Not at all, you are doing a very important job. It takes too much time to
download components from different sources, to combine them and to make
them working. When you just want to try a new library out, you are lost.
BTW, the blame is all on non-Ada stuff. There was never any problem to
incorporate an Ada library, because Ada has that excellent concept of
compilation units. The problems begin when Ada is mere bindings to some
other language mess with its dreadful makefiles and the horrific configure
tool...
> Besides the respective merits of GTK+, Qt and their Ada bindings, you
> may find that ease of installation and deployment are also of
> importance. By that metric, I suggest you take a look at Debian GNU/
> Linux 5.0 "Lenny", the stable distribution. It ships GCC 4.3 and
> GtkAda 2.8.1 as packages, i.e. precompiled and preconfigured for
> immediate use, along with a host of other Ada libraries. Beware
> though: you may get spoiled with the ease of use and never want to go
> back to Windows :)
Well, strange it might hear, but Windows API have their merits. One example
specifically important to Ada, there is no any problem to send and receive
Windows message from concurrent Ada tasks.
> The installation is as easy as:
>
> aptitude install libgtkada2-dev
>
> which will also pull the correct version of GCC and any other packages
> necessary.
>
> If you feel adventurous, you may want to try the testing distribution;
> it has GtkAda 2.12.0. I am planning to upload GtkAda 2.14.2 to
> unstable in the next couple of weeks; it should reach testing by the
> end of January.
Some information maybe interesting for you. I am using gtk 2.14.7 under
Fedora Core 10, I am planing to jump over to the core 12 (since the core 11
is broken). So far there is no problems, except for sporadic Storage_Error
(caused by SIGSEGV). I am investigating the issue. Have you seen something
alike?
Under Windows I go with gtk 2.14.5, which works perfectly well.
In both cases I didn't change anything in the GtkAda 2.14 itself, just
recompiled it.
This is at http://sourceforge.net/projects/tcladashell/ . There is a
GUI developer RAPID at https://savannah.nongnu.org/projects/rapid/ .
The TASH web pages are at present lost in a Sourceforge wiki shuffle,
but in any case they never included explicit setup instructions (a
fact which I've registered as a high-priority bug). If you have any
interest in pursuing the TASH option, mail me and I'll fix it sooner!
Thanks.
> BTW, the blame is all on non-Ada stuff. There was never any problem to
> incorporate an Ada library, because Ada has that excellent concept of
> compilation units. The problems begin when Ada is mere bindings to some
> other language mess with its dreadful makefiles and the horrific configure
> tool...
Yes, I should know. Speaking of configure, in the most complex cases
I bypass autoconf, configure, automake and recursive Makefiles
completely. I replace them with one Makefile (debian/rules, mandated
by the Debian Policy) and one simple GNAT project file with a couple
of External (...) references. Works like a charm.
>> Besides the respective merits of GTK+, Qt and their Ada bindings, you
>> may find that ease of installation and deployment are also of
>> importance. By that metric, I suggest you take a look at Debian GNU/
>> Linux 5.0 "Lenny", the stable distribution. It ships GCC 4.3 and
>> GtkAda 2.8.1 as packages, i.e. precompiled and preconfigured for
>> immediate use, along with a host of other Ada libraries. Beware
>> though: you may get spoiled with the ease of use and never want to go
>> back to Windows :)
>
> Well, strange it might hear, but Windows API have their merits. One example
> specifically important to Ada, there is no any problem to send and receive
> Windows message from concurrent Ada tasks.
I agree but I was not talking about the respective merits of the
Windows API. I was talking about the ease of installation of the
development environment (including the libraries) and ease of
deployment on the target machines. Pardon me the expression but
Windows sucks big time in that department.
>> The installation is as easy as:
>
>> aptitude install libgtkada2-dev
>
>> which will also pull the correct version of GCC and any other packages
>> necessary.
>
>> If you feel adventurous, you may want to try the testing distribution;
>> it has GtkAda 2.12.0. I am planning to upload GtkAda 2.14.2 to
>> unstable in the next couple of weeks; it should reach testing by the
>> end of January.
>
> Some information maybe interesting for you. I am using gtk 2.14.7 under
> Fedora Core 10, I am planing to jump over to the core 12 (since the core 11
> is broken). So far there is no problems, except for sporadic Storage_Error
> (caused by SIGSEGV). I am investigating the issue. Have you seen something
> alike?
No but I do very little GtkAda programming on Debian. I use AdaCore's
Pro source-only distribution at work and have not found the issue you
are referring to. FWIW, the version of GTK+ in Debian 5.0 "Lenny" is
2.12.12 and GtkAda is, like I said earlier, 2.8.1.
> Under Windows I go with gtk 2.14.5, which works perfectly well.
>
> In both cases I didn't change anything in the GtkAda 2.14 itself, just
> recompiled it.
That's my point - Debian users don't have to recompile GtkAda at
all :)
Oh, and another benefit of Debian is the public bug database;
AdaCore's bug database is secret even for GNAT GPL users. The public
mailing list does not count as a database :)
--
Ludovic Brenta.
> I agree but I was not talking about the respective merits of the
> Windows API. I was talking about the ease of installation of the
> development environment (including the libraries) and ease of
> deployment on the target machines. Pardon me the expression but
> Windows sucks big time in that department.
Yes, recent development with manifest files for DLLs is a sheer disaster.
>> In both cases I didn't change anything in the GtkAda 2.14 itself, just
>> recompiled it.
>
> That's my point - Debian users don't have to recompile GtkAda at
> all :)
Actually, it would be sufficient to install the sources into the GNAT
directory tree and then let them compile on demand from the user project.
The relocatable version of GtkAda does not work under Windows anyway, and
there is not that many GtkAda-based applications to worry about making it
shared.
> Oh, and another benefit of Debian is the public bug database;
> AdaCore's bug database is secret even for GNAT GPL users. The public
> mailing list does not count as a database :)
Well, if AdaCore does not pay much attention to that database, it won't
help. This is another story, but we need a widget library of our own (as a
part of a larger Ada platform abstraction layer).
In most cases i found the GUI not worth the effort, eg. i case it is
intendeted to present the results of a lengthly computation which run
anyway in the background. In such cases i am using simple text based
result files and GNU plot. It is avaiable on both platforms.
In case you plan for an interactive GUI; well i guess GtkAda would be
the right choice or using a completely different language ..
Michael