comp.lang.ada
 help / color / mirror / Atom feed
* Re: Ada and Mesa
  1996-06-11  0:00 Ada and Mesa Ruediger Berlich
@ 1996-06-11  0:00 ` James_Rogers
  1996-06-12  0:00   ` Robert Dewar
  1996-06-12  0:00   ` Jon S Anthony
  1996-06-12  0:00 ` James E. Hopper
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 8+ messages in thread
From: James_Rogers @ 1996-06-11  0:00 UTC (permalink / raw)
  To: berlichr


berlichr@afal30 (Ruediger Berlich) wrote:
>Hi all,
>I think about migrating from C/C++ to Ada. I've been looking for a 
>language, that meets a couple of demands, thereby preserving the power
>of C++.
>On my wish-list are :
>- The language should be standardised
>- There should be threads 
>- Object-oriented programming
>- Portability 
>- Libraries for graphics-programming available.
>O.k., Ada9x seems to fit the first three requirements.
>I don't know about the fourth point. As far as I can see, there is only
>GNAT, which is available on a majority of platforms. As it is under the 
>GPL, I am not sure, whether I can develop commercial programs with it.

The GPL does not prohibit the development of commercial products using GNAT.
It merely prohibits selling GNAT as a commercial product.

There are commercially available Ada 95 compilers for many popular computer
platforms.  If you are not comfortable with GNAT you should contact one of
the manufacturers referenced on 

http://lglwww.epfl.ch/Ada

>I would be glad, if someone who develops commercial programs with GNAT,
>could send me his/her experiences concerning the GPL.
>The fifth point : I couldn't find any hint that there do exist bindings
>from Ada9x to e.g. X11. I have an Ada-Tutorial from some WWW-server, which
>explains Ada9x for C/C++-programmers. It says something about the possibility tolink with existing C/C++/Fortran-object-files.
>So does this mean, it is possible to call e.g. xlib or xtoolkit-functions
>from Ada, just as you would from Frotran for example ?
>Is it possible to use the Mesa-library or other OpenGL-packages ?
>Thanks for any hint.
>
>Please reply via mail to
>berlich@pc66.mppmu.mpg.de]
>

Linking to existing C object files is somewhat easier than linking to existing
C++ object files.  C++ is more difficult due to the symbol name mangling
produced so commonly by C++ compilers.  If you understand how to navigate the
symbol mangling for your compiler then calling the function from Ada is easy.
If you do not understand how to navigate the symbol name mangling you will
have great difficulty.  The Ada compiler simply needs to know that the 
library object being called is a "C" type object, and its correct library name.
The C++ symbol mangling causes that correct library name to be unexpectedly
complex.

There are existing Ada bindings to all standard X-toolkit functions.  It may
be easier to acquire one of these binding sets than to deal with the C++
symbol name mangling issue.

>Bye and have a nice day,
>Ruediger
>

-- 
Jim Rogers

*********************************************
I would not say that my mind is filled with useless information.
The information is, however, amazingly inappropriate in most circumstances.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Ada and Mesa
@ 1996-06-11  0:00 Ruediger Berlich
  1996-06-11  0:00 ` James_Rogers
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Ruediger Berlich @ 1996-06-11  0:00 UTC (permalink / raw)



Hi all,
I think about migrating from C/C++ to Ada. I've been looking for a 
language, that meets a couple of demands, thereby preserving the power
of C++.
On my wish-list are :
- The language should be standardised
- There should be threads 
- Object-oriented programming
- Portability 
- Libraries for graphics-programming available.
O.k., Ada9x seems to fit the first three requirements.
I don't know about the fourth point. As far as I can see, there is only
GNAT, which is available on a majority of platforms. As it is under the 
GPL, I am not sure, whether I can develop commercial programs with it.
I would be glad, if someone who develops commercial programs with GNAT,
could send me his/her experiences concerning the GPL.
The fifth point : I couldn't find any hint that there do exist bindings
from Ada9x to e.g. X11. I have an Ada-Tutorial from some WWW-server, which
explains Ada9x for C/C++-programmers. It says something about the possibility tolink with existing C/C++/Fortran-object-files.
So does this mean, it is possible to call e.g. xlib or xtoolkit-functions
from Ada, just as you would from Frotran for example ?
Is it possible to use the Mesa-library or other OpenGL-packages ?
Thanks for any hint.

Please reply via mail to
berlich@pc66.mppmu.mpg.de]

Bye and have a nice day,
Ruediger





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada and Mesa
  1996-06-11  0:00 ` James_Rogers
  1996-06-12  0:00   ` Robert Dewar
@ 1996-06-12  0:00   ` Jon S Anthony
  1 sibling, 0 replies; 8+ messages in thread
From: Jon S Anthony @ 1996-06-12  0:00 UTC (permalink / raw)



In article <4pkset$cgv@ss2.cs.mci.com> James_Rogers <jrogers> writes:

>  Linking to existing C object files is somewhat easier than linking
> to existing C++ object files.  C++ is more difficult due to the
> symbol name mangling produced so commonly by C++ compilers.  If you
> understand how to navigate the symbol mangling for your compiler
> then calling the function from Ada is easy.

This is just as true for C (or anything else) as Ada.  To interface
C++ to C (with C call into C++) you need to extern C the C++ stuff
to which you want access (whether from Ada or C).  This will keep
the name mangling at bay and you can use standard import pragmas.


>  If you do not understand how to navigate the symbol name mangling
> you will have great difficulty.

No matter what you are using.


>  The Ada compiler simply needs to know that the
> library object being called is a "C" type object, and its correct
> library name.  The C++ symbol mangling causes that correct library
> name to be unexpectedly complex.

I haven't had a chance to look at how GNAT gets around this issue.
Anyone have an elevator version of how ACT solves this problem?


/Jon
-- 
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178

617.484.3383
jsa@organon.com





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada and Mesa
  1996-06-11  0:00 Ada and Mesa Ruediger Berlich
                   ` (2 preceding siblings ...)
  1996-06-12  0:00 ` Jon S Anthony
@ 1996-06-12  0:00 ` Robert Dewar
  3 siblings, 0 replies; 8+ messages in thread
From: Robert Dewar @ 1996-06-12  0:00 UTC (permalink / raw)



Rueidiger says

"I don't know about the fourth point. As far as I can see, there is only
GNAT, which is available on a majority of platforms. As it is under the
GPL, I am not sure, whether I can develop commercial programs with it."

That there might be a problem is a common misconception, but there is none.
Your program will of course include stuff from the runtime library which
is the source of concern, but the entire GNAT runtime library uses a
modified version of the GPL which completely eliminates such concerns. 
Here is the text from a typical runtime library header:

-- GNAT is free software;  you can  redistribute it  and/or modify it under --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
-- for  more details.  You should have  received  a copy of the GNU General --
-- Public License  distributed with GNAT;  see file COPYING.  If not, write --
-- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
-- MA 02111-1307, USA.                                                      --
--                                                                          --
-- As a special exception,  if other files  instantiate  generics from this --
-- unit, or you link  this unit with other files  to produce an executable, --
-- this  unit  does not  by itself cause  the resulting  executable  to  be --
-- covered  by the  GNU  General  Public  License.

Lots of ACT's customers (in fact most or nearly all) are using GNAT to
develop proprietary or even highly classified software.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada and Mesa
  1996-06-11  0:00 ` James_Rogers
@ 1996-06-12  0:00   ` Robert Dewar
  1996-06-12  0:00   ` Jon S Anthony
  1 sibling, 0 replies; 8+ messages in thread
From: Robert Dewar @ 1996-06-12  0:00 UTC (permalink / raw)



James_Rogers says

"The GPL does not prohibit the development of commercial products using GNAT.
It merely prohibits selling GNAT as a commercial product."

Even that is false, if anyone wants to sell GNAT for $2,000,000, they
are welcome and this does not violate the GPL in any way. Of course they
may not sell many copies given that (a) there are other sources and
(b) what the GPL does require is that anyone who has the program can
freely give it away to others with no restrictions or no requirement to
charge.

What the GPL does (the standard one, not our modified library one) is
require that any program that incorporates any GPL code, if it is
distributed, must be distributed under GPL conditions (source made
available, and free re-distribution permitted).

People often think that there is some required distribution of GPL'ed
software, but that's definitely not the case. ACT continues to make
GNAT freely available because that is the policy of ACT, not because
it is required by the GPL. There is nothing in the GPL to stop ACT
from refusing to distribute any further versions of GNAT, and to
simply continue developing it internally for its own use. However,
ACT has a commitment, nothing to do with the GPL, to continue to
make future enhancements of GNAT freely available.

None of this discussion aplies to programs compiled using GNAT in any case,
such programs have no restrictions, because of the modified GPL that we
use for the run time library. If you generate a program using GNAT, you
can sell it, license it, keep it as proprietary as you like, refuse to
distribute the source etc. 

We certainly like to see GNAT being used to develop tools and applications
that are freely availale like GNAT itself, but that's just one possible
use of GNAT, and as I said before, many of ACT's customers are indeed
developing proprietary programs using GNAT. Furthermore, their continued
support of GNAT helps ensure that it remains freely available, so everyone
benefits!

Robert Dewar
ACT





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada and Mesa
  1996-06-11  0:00 Ada and Mesa Ruediger Berlich
  1996-06-11  0:00 ` James_Rogers
  1996-06-12  0:00 ` James E. Hopper
@ 1996-06-12  0:00 ` Jon S Anthony
  1996-06-12  0:00   ` Pascal Obry
  1996-06-12  0:00 ` Robert Dewar
  3 siblings, 1 reply; 8+ messages in thread
From: Jon S Anthony @ 1996-06-12  0:00 UTC (permalink / raw)



In article <DsuqM2.IBK@news.cern.ch> berlichr@afal30 (Ruediger Berlich) writes:

> I think about migrating from C/C++ to Ada. I've been looking for a 
> language, that meets a couple of demands, thereby preserving the power
> of C++.                                           ^^^^^^^^^^
> On my wish-list are :
> - The language should be standardised

No need to worry about preserving this since C++ isn't standardized!!
Even so, Ada95 _is_ (ISO/IEC 8652:1995)

> - There should be threads 

No need to worry about preserving this since C++ has _NO_ threads!!
Even so, Ada95 certainly does.

> - Object-oriented programming

Yes, Ada is fully OO.


> - Portability 

About as portable as you could reasonably expect.  Really.  If you are
the least bit careful about platform issues, it will port _much_
easier than C (that supposed paragon of portability - NOT!)


> - Libraries for graphics-programming available.

Well, X/Motif, Win32 are available (freely).  You can also go the
route of AdaMagic - the Ada compiler for JavaVM.

See these resources:

-- X11/Motif
--
http://www.inmet.com/~mg/x11ada/x11ada.html

-- Win32
--
http://sw-eng.falls-church.va.us/AdaIC/source-code/bindings/win32ada/win32ada.html

-- Tcl/TK
--
http://www.ocsystems.com/xada/tash

-- Java
--
http://www.inmet.com



> O.k., Ada9x seems to fit the first three requirements.

Ada95 for the last year.


> I don't know about the fourth point. As far as I can see, there is only
> GNAT, which is available on a majority of platforms. As it is under the 
> GPL, I am not sure, whether I can develop commercial programs with it.

1. There are other compilers available.  Several.  For example,
Thomson's ObjectAda (complete with IDE, GUI builder, etc.) and
Rational's.

2. Gnat is definitely usable for commercial software development - 
no restrictions or licensing problems at all.  We currently are
using it for this.  And it is definitely ready for "industrial
strength" applications.


> I would be glad, if someone who develops commercial programs with GNAT,
> could send me his/her experiences concerning the GPL.

No need.  No problem.  This was discussed to death here about a year
ago.


> The fifth point : I couldn't find any hint that there do exist
> bindings from Ada9x to e.g. X11. I have an Ada-Tutorial from some
> WWW-server, which explains Ada9x for C/C++-programmers. It says
> something about the possibility tolink with existing
> C/C++/Fortran-object-files.  So does this mean, it is possible to
> call e.g. xlib or xtoolkit-functions from Ada, just as you would

Yes.  Certainly.  I do so all the time.


> from Frotran for example ?

Easier.


>  Is it possible to use the Mesa-library
> or other OpenGL-packages ?  Thanks for any hint.

Just goes to show, I don't know everything! :-)  Really, I don't
know about these two (though I think the latter has been mentioned
as available...)


/Jon

> Please reply via mail to
> berlich@pc66.mppmu.mpg.de]
> 
> Bye and have a nice day,
> Ruediger
> 
-- 
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178

617.484.3383
jsa@organon.com





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada and Mesa
  1996-06-11  0:00 Ada and Mesa Ruediger Berlich
  1996-06-11  0:00 ` James_Rogers
@ 1996-06-12  0:00 ` James E. Hopper
  1996-06-12  0:00 ` Jon S Anthony
  1996-06-12  0:00 ` Robert Dewar
  3 siblings, 0 replies; 8+ messages in thread
From: James E. Hopper @ 1996-06-12  0:00 UTC (permalink / raw)



>- The language should be standardised
>- There should be threads
>- Object-oriented programming

you agree with these three i would like to add my assurances they are all
fine.

>- Portability

we develop our radar simulator using gnat on sgi.  i just got done
recompiling it on the gnat compielr i ported to the macintosh.  it took 15
minutes to compiler thats it! You cant ask for more portable than that (or
two more different systems).  we have also used gnat code interchangably
on
sun as well.

>- Libraries for graphics-programming available.
lets see on sgi and mac i have macOS [mac only], opengl, X, and Motif i
have also seen
mention that someone has a phigs binding.  there are a couple of tools for
doing bindings pretty automagically. one is free on Intermetrics home page
(c2ada, see home of the brave ada programmers), the other is in beta at
sgi. c2ada was used to do the bindings to x and motif as well as a
microsoft NT binding.  we have used the sgi tool (well tom quiggle at sgi
did it for us actually) to do bindings to a gui
generator called xforms (took 30 minutes to get the bindings back and they
compiled and ran first time).  in additon i am working with a partner who
is
doing the mac OS bindings and its really very straightforward to do even
by 
hand [though we starte with the output of the sgi tool on these as well].

as to the question of commercial development our radar sim is a commercial
software package that we license to vendors of flight trainers its done
using
gnat and our company lawyers had no trouble with the gpl nor did our first
customer for the new ada95 version of our tools in austraila.

best jim

"An ancient eastern proverb says: I complained because I had no shoes;
then I met a man who had no feet. For the 90's: I complained because I
had no PowerMac; then I met a man who used Windows."--Cloyce Sutton




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada and Mesa
  1996-06-12  0:00 ` Jon S Anthony
@ 1996-06-12  0:00   ` Pascal Obry
  0 siblings, 0 replies; 8+ messages in thread
From: Pascal Obry @ 1996-06-12  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4543 bytes --]



jsa@organon.com (Jon S Anthony) wrote:

>In article <DsuqM2.IBK@news.cern.ch> berlichr@afal30 (Ruediger Berlich) writes:

>> I think about migrating from C/C++ to Ada. I've been looking for a 
>> language, that meets a couple of demands, thereby preserving the power
>> of C++.                                           ^^^^^^^^^^
>> On my wish-list are :
>> - The language should be standardised

>No need to worry about preserving this since C++ isn't standardized!!
>Even so, Ada95 _is_ (ISO/IEC 8652:1995)

>> - There should be threads 

>No need to worry about preserving this since C++ has _NO_ threads!!
>Even so, Ada95 certainly does.

>> - Object-oriented programming

>Yes, Ada is fully OO.


>> - Portability 

>About as portable as you could reasonably expect.  Really.  If you are
>the least bit careful about platform issues, it will port _much_
>easier than C (that supposed paragon of portability - NOT!)


>> - Libraries for graphics-programming available.

>Well, X/Motif, Win32 are available (freely).  You can also go the
>route of AdaMagic - the Ada compiler for JavaVM.

>See these resources:

>-- X11/Motif
>--
>http://www.inmet.com/~mg/x11ada/x11ada.html

>-- Win32
>--
>http://sw-eng.falls-church.va.us/AdaIC/source-code/bindings/win32ada/win32ada.html

>-- Tcl/TK
>--
>http://www.ocsystems.com/xada/tash

>-- Java
>--
>http://www.inmet.com



>> O.k., Ada9x seems to fit the first three requirements.

>Ada95 for the last year.


>> I don't know about the fourth point. As far as I can see, there is only
>> GNAT, which is available on a majority of platforms. As it is under the 
>> GPL, I am not sure, whether I can develop commercial programs with it.

>1. There are other compilers available.  Several.  For example,
>Thomson's ObjectAda (complete with IDE, GUI builder, etc.) and
>Rational's.

>2. Gnat is definitely usable for commercial software development - 
>no restrictions or licensing problems at all.  We currently are
>using it for this.  And it is definitely ready for "industrial
>strength" applications.


>> I would be glad, if someone who develops commercial programs with GNAT,
>> could send me his/her experiences concerning the GPL.

>No need.  No problem.  This was discussed to death here about a year
>ago.


>> The fifth point : I couldn't find any hint that there do exist
>> bindings from Ada9x to e.g. X11. I have an Ada-Tutorial from some
>> WWW-server, which explains Ada9x for C/C++-programmers. It says
>> something about the possibility tolink with existing
>> C/C++/Fortran-object-files.  So does this mean, it is possible to
>> call e.g. xlib or xtoolkit-functions from Ada, just as you would

>Yes.  Certainly.  I do so all the time.


>> from Frotran for example ?

>Easier.


>>  Is it possible to use the Mesa-library
>> or other OpenGL-packages ?  Thanks for any hint.

>Just goes to show, I don't know everything! :-)  Really, I don't
>know about these two (though I think the latter has been mentioned
>as available...)

Well here I can help. I have done some OpenGL with GNAT under NT and
Windows95 with the Win32Ada binding. It's working ok. There were some
bugs in the Win32Ada binding that I have reported, and intermetrics is
about to release a new version of Win32Ada that works for GNAT 3.04.
Win32Ada is a complete binding to the Win32 API.

I don't really know Mesa. I think it's a free OpenGL library in C for
Linux. As Jon told you, it's really easy to interface Ada95 with C.
You must have a look at the Interfaces (and childs) package.


>/Jon

>> Please reply via mail to
>> berlich@pc66.mppmu.mpg.de]
>> 
>> Bye and have a nice day,
>> Ruediger
>> 
>-- 
>Jon Anthony
>Organon Motives, Inc.
>1 Williston Road, Suite 4
>Belmont, MA 02178

>617.484.3383
>jsa@organon.com


Pascal.

--|------------------------------------------------------------
--| Pascal Obry                               Team-Ada Member |
--|                                                           |
--| EDF-DER-IPN-SID- Ing�nierie des Syst�mes d'Informations   |
--|                                                           |
--| Bureau G1-010           e-mail: pascal.obry@der.edfgdf.fr |
--| 1 Av G�n�ral de Gaulle  voice : +33-1-47.65.50.91         |
--| 92141 Clamart CEDEX     fax   : +33-1-47.65.50.07         |
--| FRANCE                                                    |
--|------------------------------------------------------------
--|
--|   http://ourworld.compuserve.com/homepages/pascal_obry
--|
--|   "The best way to travel is by means of imagination"





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1996-06-12  0:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-11  0:00 Ada and Mesa Ruediger Berlich
1996-06-11  0:00 ` James_Rogers
1996-06-12  0:00   ` Robert Dewar
1996-06-12  0:00   ` Jon S Anthony
1996-06-12  0:00 ` James E. Hopper
1996-06-12  0:00 ` Jon S Anthony
1996-06-12  0:00   ` Pascal Obry
1996-06-12  0:00 ` Robert Dewar

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