comp.lang.ada
 help / color / mirror / Atom feed
From: "DuckE" <nospam_steved94@home.com>
Subject: Re: Mixed Ada and C program
Date: Tue, 12 Jun 2001 02:40:25 GMT
Date: 2001-06-12T02:40:25+00:00	[thread overview]
Message-ID: <tifV6.152852$p33.3210996@news1.sttls1.wa.home.com> (raw)
In-Reply-To: h55V6.898$j6.76089@news

While you can certainly do this, you shouldn't have to go to the trouble.

You should be able to export the procedure or function directly:

  PROCEDURE My_Procedure;
  PRAGMA Export( C, My_Procedure );

  PROCEDURE My_Procedure IS
  BEGIN
    -- Do_Something
    NULL;
  END My_Procedure;

While I haven't done this with 'C', I have exported Ada functions and
procedures using 'C' conventions and then linked the functions and
procedures with Delphi.  I would think things would work the same way.

SteveD.

"Joelle Lavergne" <jlavergne@drs.ca> wrote in message
news:h55V6.898$j6.76089@news...
> I  have answered my question... I will pass the adress of the Ada
procedure
> to the C function.
>
> Thanks
>
> Joelle Lavergne <jlavergne@drs.ca> wrote in message
> news:rF4V6.895$j6.75257@news...
> > Hello I am pretty new to the Ada world.
> >
> > I need to build an application using Ada and C. The main application is
in
> > Ada but I need to import C function to Ada and export Ada procedures to
C.
> > My problem is when exporting my Ada procedure to C.
> >
> > Could anybody give me some info on how to call this Ada procedure from C
?
> >
> > Thanks
> >
> >
>
>





  parent reply	other threads:[~2001-06-12  2:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-11 14:33 Mixed Ada and C program Joelle Lavergne
2001-06-11 14:44 ` Marin David Condic
2001-06-11 15:03 ` Joelle Lavergne
2001-06-11 15:19   ` Ted Dennison
2001-06-12  2:40   ` DuckE [this message]
2001-06-11 15:10 ` Ted 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