comp.lang.ada
 help / color / mirror / Atom feed
From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk)
Subject: Re: ada calling into C library?
Date: 1998/10/31
Date: 1998-10-31T00:00:00+00:00	[thread overview]
Message-ID: <F1p2Ex.70@jvdsys.nextjk.stuyts.nl> (raw)
In-Reply-To: 3639E39E.EFA4B968@aston.ac.uk

Danny (clarked@aston.ac.uk) wrote:

: I've a project on a unix system V platform using gnat compilers...

: What I would like to do is have a C / C++ library communicating with a
: database and ada programs making calls into that library to get data.

Yes, that can be done by writing an Ada binding to the C/C++ library.

: Ideally I would like the library to return objects ala COM but this may
: be unrealistic so I would be happy enough to return structures /
: records. 

That depents on the model. I do not know if there is COM support on
Sys V (I doubt it), but Corba should be doable.

: Does anyone know how possible this is and if is likely to be
: worth the effort.

Yes, its worth the effort, especially if you reuse the bindings for
other projects.

:    Its not an option to use C throughout the project but
: Ada could be used to communicate with the database.  The reason for
: using C is so I can use the Rogue Wave DBTools classes to deal with the
: database.

In that case (presuming there is no Ada binding to DBTools), why write
intermediate C or C++ code. Why not interface to the DBTools directly ?

Jerry.

-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada
-- Ada & Win32: http://stad.dsl.nl/~jvandyk




      parent reply	other threads:[~1998-10-31  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-30  0:00 ada calling into C library? Danny
1998-10-30  0:00 ` jim
1998-10-31  0:00 ` Jerry van Dijk [this message]
replies disabled

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