From: husseinp@logica.co.uk (Paul Hussein)
Subject: Re: C to Ada interfacing
Date: 1996/07/31
Date: 1996-07-31T00:00:00+00:00 [thread overview]
Message-ID: <4tnaod$d2n@romeo.logica.co.uk> (raw)
In-Reply-To: 4tm4mg$cjp@optional.cts.com
lees@cts.com (Lee Slaughter) wrote:
>Hi,
>I'm not an Ada programmer but need to interface with Ada
>routines from C (on a VxWorks platform).
>I have searched here, FAQ and the Tartanworks Ada docs
>and found a little, but I could use more.
>I'd appreciate it, especially sample code.
>In my probably naive view i'd make a call to someAdaFn( arg )
>and my Ada-programmer peer would define this function in some
>.ada or whatever source file who's
>object file would be linked in with the C .o stuff, and of
>course have to take special care to be sure data types align,
>are in the right order with right number of gaps and all.
>Is that sort of sketchily it?
>Thanks...
>lee
>---
> Lee Slaughter - network management development: submarine stuff
> Navy R & D, Point Loma, San Diego, CA lees@nosc.mil
> "Giving credence to his ramblings indicates a cognitive disorder..."
> - Lee's psychiatrist, circa 1952
You really need to look in the LRM for your compiler for this sort of
stuff. Pragma interface to and from C is very troublesome as their is
little standard support for it. The best approaches are :
1. Avoid at alll costs.
2. Get someone else to do it.
3. Obtain some example bindings from somewhere ( e.g. X Bindings ),
they must be for your specific target and compiler.
4. Read Appendix F ( or is it E ? ) of your LRM especially for
exporting functions.
Why don't you bung an example piece of code in the newsgroup and
some kind sole might help you along.
next prev parent reply other threads:[~1996-07-31 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-30 0:00 C to Ada interfacing Lee Slaughter
1996-07-31 0:00 ` PR MITTON
1996-07-31 0:00 ` Paul Hussein [this message]
1996-08-01 0:00 ` David Wheeler
1996-08-01 0:00 ` Theodore E. Dennison
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox