comp.lang.ada
 help / color / mirror / Atom feed
From: cdecker@snet.net (Decker, Christian R)
Subject: Re: Graphic and C/C++ programs in Ada?
Date: 1999/06/17
Date: 1999-06-17T00:00:00+00:00	[thread overview]
Message-ID: <2a4a3.2401$S7.1250712@WReNphoon3> (raw)
In-Reply-To: 7k9t72$8k2$1@nnrp1.deja.com

I don't know of any _standard_ Ada libraries that include similar routines
to the gotoxy.  I have
 seen some non-standard packages that will perform these functions however,
but you would have to search
for them.

As far as Ada and C/C++ this is possible.  I have posted some questions
relating to this topic.  I have done
extensive interfacing with C/C++ using Ada.  There are some tricks when C++
gets invloved due to the wonderful
'name mangling' that C++ compilers do, but good ol' C is no prob.

Create an Ada package that prototypes the C function you wish to interface
to.  Use a procedure prototype for
functions with no return values.  Make sure you match the parameter profile.
Ada95 has an Interfaces.C package
which is very useful.

i.e.
Package X is

   procedure C_Function ( Param1 : Integer ) ;

   pragma Import ( C , C_Function , "C_Function") ;

end X ;

See earlier questions on Ada to C++ for info on that.  Once you have the
protype, just add the object or lib file to
gnatlink to resolve the interfaced functions.

Also.... As far as writing graphical programs with Ada, it is possible.
Gnat 3.11 has built in Win32 libraries so
if you program the Win API using C, you can do it with Gnat 3.11.  Also
there are bindings to the X windows
system as well.  Just search for them on the Net.  It is quite easy to get
working.  I have also created my own
bindings to the OpenGL routines on an SGI machine, but would work on any
Unix box.  If anyone is interested
in getting the bindings, post it and i'll try to get you the source.

Anyway.. good luck.



   -**** Posted from RemarQ, http://www.remarq.com/?a ****-
 Search and Read Usenet Discussions in your Browser - FREE -




  parent reply	other threads:[~1999-06-17  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-17  0:00 Graphic and C/C++ programs in Ada? Dale Stanbrough
1999-06-17  0:00 ` mehrdad1
1999-06-17  0:00   ` David Botton
1999-06-17  0:00   ` Decker, Christian R [this message]
1999-06-17  0:00   ` Tarjei Tj�stheim Jensen
replies disabled

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