comp.lang.ada
 help / color / mirror / Atom feed
* Interfacing to C++
@ 2002-03-01  0:09 Wannabe h4x0r
  2002-03-01  0:28 ` sk
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wannabe h4x0r @ 2002-03-01  0:09 UTC (permalink / raw)


As C++ is a "superset" of C, can I bind to C++ libs using Interfaces.C or
do I have to define my own types and methods?

I plan on using QT 3.0 and likely GNOME 2.0(once it's released).

Any docs you guys could point me to, or tips on how to get started?

Chris



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

* Re: Interfacing to C++
  2002-03-01  0:09 Interfacing to C++ Wannabe h4x0r
@ 2002-03-01  0:28 ` sk
  2002-03-01  2:48   ` Wannabe h4x0r
  2002-03-01  1:50 ` Larry Kilgallen
  2002-03-03  5:05 ` David Starner
  2 siblings, 1 reply; 6+ messages in thread
From: sk @ 2002-03-01  0:28 UTC (permalink / raw)


Hi,

>Any docs you guys could point me to, or tips on how 
>to get started?

Have you read THE GNAT MANUALS ?

There is a whole lovely section titled in

    "Building mixed Ada & C++ programs" 

the Gnat Users Guide (this also references the Gnat
reference manual "Interfacing with C++"). 

It has sections : 

    "Interfacing to C++"
    "Linking a mixed C++ & Ada program"
    "A simple example"
    "Adapting the runtime to a new C++ compiler"

When these have been purused and you have 
specific and unanswered issues (and also done
some rapid-prototyping to test working 
hypotheses) then might be a good time to post a 
question to c.l.a

-------------------------------------
-- Merge vertically for real address
-------------------------------------
s n p @ t . o
 k i e k c c m
-------------------------------------



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

* Re: Interfacing to C++
  2002-03-01  0:09 Interfacing to C++ Wannabe h4x0r
  2002-03-01  0:28 ` sk
@ 2002-03-01  1:50 ` Larry Kilgallen
  2002-03-03  5:05 ` David Starner
  2 siblings, 0 replies; 6+ messages in thread
From: Larry Kilgallen @ 2002-03-01  1:50 UTC (permalink / raw)


In article <mFzf8.14835$bs1.347007@sccrnsc01>, Wannabe h4x0r <chris@dont.spam.me> writes:
> As C++ is a "superset" of C, can I bind to C++ libs using Interfaces.C or
> do I have to define my own types and methods?

The relationship between C++ and C is at the program source level,
not the innards of linking object modules.

The relationship between Ada and C is at the object module linking
level, and must be implemented by Ada compiler vendors.  There is
no reason to believe some behavior not claimed by the compiler
vendor would automatically "just work".



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

* Re: Interfacing to C++
  2002-03-01  0:28 ` sk
@ 2002-03-01  2:48   ` Wannabe h4x0r
  2002-03-01  5:26     ` sk
  0 siblings, 1 reply; 6+ messages in thread
From: Wannabe h4x0r @ 2002-03-01  2:48 UTC (permalink / raw)


On Thu, 28 Feb 2002 19:28:43 -0500, sk wrote:

> Hi,
> 
>>Any docs you guys could point me to, or tips on how to get started?
> 
> Have you read THE GNAT MANUALS ?
> 
> There is a whole lovely section titled in
> 
>     "Building mixed Ada & C++ programs"
> 
> the Gnat Users Guide (this also references the Gnat reference manual
> "Interfacing with C++").
> 
> It has sections :
> 
>     "Interfacing to C++"
>     "Linking a mixed C++ & Ada program"
>     "A simple example"
>     "Adapting the runtime to a new C++ compiler"
> 
> When these have been purused and you have specific and unanswered issues
> (and also done some rapid-prototyping to test working hypotheses) then
> might be a good time to post a question to c.l.a
> 
> ------------------------------------- -- Merge vertically for real
> address
> ------------------------------------- s n p @ t . o
>  k i e k c c m
> -------------------------------------


Perhaps I should have been more specific.

I'm looking for additional information that might lie OUTSIDE of the GNAT
Manuals.

And I'm not asking for anyone in c.l.a. to spoon feed me the information.

I'm simply looking for pointers to OTHER DOCUMENTATION !!!BESIDES!!! the
GNAT MANUALS which might exist out there on the net.

Thank You.

Chris



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

* Re: Interfacing to C++
  2002-03-01  2:48   ` Wannabe h4x0r
@ 2002-03-01  5:26     ` sk
  0 siblings, 0 replies; 6+ messages in thread
From: sk @ 2002-03-01  5:26 UTC (permalink / raw)


Hi, 

Hmmm ... yes, my original post does appear rather ill 
tempered so if you allow me, I will apologise and I 
will try again.

-----------------------------------------------------------------
Hi Chris (aka "Wannabe h4x0r"),

From your previous posts it appears that you are using GNAT ?

If so, have you tried the example in the section of the GNAT 
Users Guide called "Building mixed Ada & C++ programs" ?

If you have trouble with the issues involved with the example,
perhaps you could post a more specific question related to
interfacing Ada with C++ and other people will be more able 
to assist you in finding a solution.

-----------------------------------------------------------------
With sincerity,

sk 

-------------------------------------
-- Merge vertically for real address
-------------------------------------
s n p @ t . o
 k i e k c c m
-------------------------------------



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

* Re: Interfacing to C++
  2002-03-01  0:09 Interfacing to C++ Wannabe h4x0r
  2002-03-01  0:28 ` sk
  2002-03-01  1:50 ` Larry Kilgallen
@ 2002-03-03  5:05 ` David Starner
  2 siblings, 0 replies; 6+ messages in thread
From: David Starner @ 2002-03-03  5:05 UTC (permalink / raw)


On Fri, 01 Mar 2002 00:09:54 GMT, Wannabe h4x0r <chris@dont.spam.me> wrote:
> As C++ is a "superset" of C, can I bind to C++ libs using Interfaces.C or
> do I have to define my own types and methods?

If you aren't using GNAT's Interfaces.CPP, then you can call the C++ as
if you were calling from C - that is, whereever you would use extern "C"
if you were interfacing C++ with C, you need it if you are interfacing
C++ with Ada.

-- 
David Starner - starner@okstate.edu
What we've got is a blue-light special on truth. It's the hottest thing 
with the youth. -- Information Society, "Peace and Love, Inc."



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

end of thread, other threads:[~2002-03-03  5:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-01  0:09 Interfacing to C++ Wannabe h4x0r
2002-03-01  0:28 ` sk
2002-03-01  2:48   ` Wannabe h4x0r
2002-03-01  5:26     ` sk
2002-03-01  1:50 ` Larry Kilgallen
2002-03-03  5:05 ` David Starner

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