From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,INVALID_MSGID, TO_MALFORMED autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8a1ccfd6a7ff0dd0,start X-Google-Attributes: gid103376,public From: James_Rogers Subject: Re: Ada and Mesa Date: 1996/06/11 Message-ID: <4pkset$cgv@ss2.cs.mci.com>#1/1 X-Deja-AN: 159686658 references: to: berlichr@afal30 content-type: text/plain; charset=us-ascii organization: MCI Telecommunications Colorado Springs, CO x-url: news:DsuqM2.IBK@news.cern.ch mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 1.12 (X11; I; AIX 2) Date: 1996-06-11T00:00:00+00:00 List-Id: 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.