From: crocker@motcid.UUCP (Ronald T. Crocker)
Subject: C functions calling {C++/Ada/...} functions
Date: 26 Mar 91 19:50:17 GMT [thread overview]
Message-ID: <4881@berry19.UUCP> (raw)
I'm looking at building a software system where (generated) C
functions must call some library functions. The library functions are
currently in both C++ and Ada; they don't have too many problems
calling C functions. The major problem that I'm having is having the
C functions call the C++ and Ada code. Is there something that I can
do mechanically to set up interfaces between C functions and C++ or
Ada functions. In particular:
+ Do I have to worry about stack frame argument positions. I
know that C++ uses C function calling conventions because it
generates C code. Does Ada use the same calling conventions?
Is this a compiler-dependent problem?
+ Are there run-time type-conversion problems that I might run
into? Again, C++ == C in this regard, but what about Ada?
+ How do I know what the name of the (C++/Ada) function that I
want to call is? The C++ function A::f can't be called like
that from a C program; it simply doesn't know what that is.
The same problem exists for Ada. Is there a simple approach
to this problem? Is this compiler dependent?
Please respond via email to crocker@mot.com. I'll summarize and post
if there is enough interest.
--
Ron Crocker
Motorola Radio-Telephone Systems Group, Cellular Infrastructure Group
(708) 632-4752 [FAX: (708) 632-4430]
crocker@mot.com or uunet!motcid!crocker
reply other threads:[~1991-03-26 19:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox