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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47a4be9898f849f0,start X-Google-Attributes: gid103376,public From: Guy Calinsky Subject: Linking FORTRAN77 to Ada83 Date: 1999/06/09 Message-ID: <375ECA88.CF7CFF7E@sll.northrop.com>#1/1 X-Deja-AN: 487698264 Content-Transfer-Encoding: 7bit Sender: news%mother@herald.northgrum.com X-Nntp-Posting-Host: 128.99.49.36 Organization: Northrop Grumman Corporation, Los Angeles, CA Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-06-09T00:00:00+00:00 List-Id: I have a subroutine written in FORTRAN that I need to link with my Ada 83 code, but I am getting an Undefined Symbol error on that subroutine. I followed the pragma example in the LRM (13.9). Here is a small app I created to test the concept: ---------------------- with Text_io; use Text_io; with Long_Float_io; use Long_Float_io; procedure Ada_Main is procedure root(A : Long_Float; B : Long_Float; C : Long_Float; Result : out Long_Float); pragma Interface(Fortran, root); result : Long_Float; begin root(1.0, 2.0, 1.0, result); put("result = "); put(result); new_line; end Ada_Main; ---------------------- My FORTRAN subroutine : subroutine root(a, b, c, x) implicit none real a, b, c, x x = SQRT(b**2 - 4.0 * a * c) / (2.0 * a) return end ---------------------- My Make script : f77 -Xlist -g -C root.for ada ada_main.a a.ld -o ada_fortran_test ada_main root.o ---------------------- Everything compiles ok and root.o does exist, yet I get this result : Undefined first referenced symbol in file root /home/calinsky/Fortran_Ada_Test/.objects/ada_main01 ld: fatal: Symbol referencing errors. No output written to ada_fortran_test Any thoughts or ideas? Thanks, Guy