comp.lang.ada
 help / color / mirror / Atom feed
From: "Dr. Michael Paus" <paus@ib-paus.com>
Subject: Re: Fortran calling Ada
Date: Thu, 10 Apr 2003 15:34:47 +0200
Date: 2003-04-10T15:34:47+02:00	[thread overview]
Message-ID: <b73rtn$qv7$1@online.de> (raw)
In-Reply-To: <d0a1ebc0.0304090012.66ee8508@posting.google.com>

Hi

Gerd Reger wrote:
> I try to compile a Fortran main program which is calling an Ada procedure
> with the follwing commands:

I always found it easier not use a Fortran main program when I was mixing
Ada and Fortran. It is a lot easier if you write a litte Ada main program
which does nothing else but to call a Fortran procedure which is equivalent
to your current Fortran main program. In this Ada main program you should
"with" all Ada packages that you are going to use. In this way you give
Ada a chance to get the elaboration of all your Ada packages right as well.
You can also compile and link then with just one gnatmake call where you
only have to provide the *.o files of your Fortran code in addition to
the normal Ada flags.

Hope that helps

Michael



> 
> g77 -c *.for
> gnatmake -c *.adb
> gnatbind -C -n *.ali
> gnatlink -C -lm -lg2c -o test *.ali *.o
> 
> I'm not able to link. 
> I use Suse 8.1 with g77 3.2 and gnat 3.15.
> 
> 
> Additional I can't debug an Ada program with this version
> of gnat. There is no more gnatgdb.
> 
> Any advice is welcome 
> 
> Many thanks
> Gerd




      parent reply	other threads:[~2003-04-10 13:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-09  8:12 Fortran calling Ada Gerd Reger
2003-04-09  9:45 ` Samuel Tardieu
2003-04-10 14:22   ` Christopher Dahnken
2003-04-10 13:34 ` Dr. Michael Paus [this message]
replies disabled

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