From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,779963aec8b92c87 X-Google-Attributes: gid103376,public X-Google-Thread: 1094ba,779963aec8b92c87 X-Google-Attributes: gid1094ba,public X-Google-ArrivalTime: 2003-04-10 06:34:48 PST From: "Dr. Michael Paus" Newsgroups: comp.lang.ada,comp.lang.fortran Subject: Re: Fortran calling Ada Date: Thu, 10 Apr 2003 15:34:47 +0200 Organization: 1&1 Internet AG Message-ID: References: NNTP-Posting-Host: p50830dd7.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: online.de 1049981687 27623 80.131.13.215 (10 Apr 2003 13:34:47 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Thu, 10 Apr 2003 13:34:47 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030311 X-Accept-Language: en-us, en In-Reply-To: Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!feed.news.nacamar.de!news.belwue.de!news.uni-ulm.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail Xref: archiver1.google.com comp.lang.ada:36048 comp.lang.fortran:35666 Date: 2003-04-10T15:34:47+02:00 List-Id: 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