comp.lang.ada
 help / color / mirror / Atom feed
From: you4818@aol.com (You4818)
Subject: Re:Compiling, binding, and linking an Ada prog. interfaced with C
Date: 1998/07/27
Date: 1998-07-27T00:00:00+00:00	[thread overview]
Message-ID: <1998072706002200.CAA02664@ladder01.news.aol.com> (raw)

Hi

I am trying to interface an Ada program to C, such that the main
program is in Ada and some entities are being imported from a 
C header file (e.g. constant variables).

For example, consider the following 

C_File.h  :  #define  Max_Val 100


Ada_File.adb : with Interfaces.C ;
				procedure Ada_File is
				MAX_VAL : Integer ;
				pragma Import(C,MAX_VAL,"Max_Val") ;

				begin
					...... process MAX_VAL ;
				end Ada_File ;


How do I compile, bind and link the above files (where Ada_File
is the main program).


Thanks in advance
Samir







             reply	other threads:[~1998-07-27  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-27  0:00 You4818 [this message]
     [not found] ` <6pi57h$k1h$1@nnrp1.dejanews.com>
1998-07-28  0:00   ` Compiling, binding, and linking an Ada prog. interfaced with C Ronald Ali
1998-07-28  0:00 ` Dr Richard A. O'Keefe
1998-07-29  0:00   ` Fergus Henderson
1998-07-30  0:00     ` Robert I. Eachus
1998-08-01  0:00       ` Robert Dewar
1998-08-02  0:00         ` Fergus Henderson
1998-08-04  0:00           ` Robert Dewar
1998-08-04  0:00             ` Fergus Henderson
1998-08-03  0:00         ` David Coote
1998-08-03  0:00           ` tedennison
1998-08-02  0:00       ` Fergus Henderson
replies disabled

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