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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7428da7bf6d46162,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-15 16:12:00 PST Path: bga.com!news.sprintlink.net!cs.utexas.edu!news.ti.com!news.dseg.ti.com!skopen!keuler From: keuler@dseg.ti.com (Keith Euler) Newsgroups: comp.lang.ada Subject: Ada interface to fortran Date: 16 Mar 1995 00:04:54 GMT Organization: Texas Instruments, Inc. Distribution: world Message-ID: <3k7vb6$g7i@mksrv1.dseg.ti.com> Reply-To: keuler@dseg.ti.com NNTP-Posting-Host: skopen.dseg.ti.com Date: 1995-03-16T00:04:54+00:00 List-Id: I am attempting to integrate some fortran code into an Ada program. When I link I get a the following message. ld:Undefined Symbol __lib_version The linker actually generates an executable that appears to work just fine. The only place I can find any reference to this symbol is in the "lib.a files supplied with the fortran compiler. I am using the Sun (Verdix) Ada compiler version 1.1 and the Sun supplied F77 fortran compiler. All the fortran code was compiled as follows "f77 -c The Ada procedure that calls this routine contains the following: Ada spec for the fortran body: procedure interface(A : in SYSTEM.Address; B : in SYSTEM.Address; C : in SYSTEM.Address; D : in SYSTEM.Address); NOTE: D is the return value. Pragmas to allow linking with the fortran libraries: pragma LINK_WITH("/apps/lang/SC2.0.1/libF77.a"); pragma LINK_WITH("/apps/lang/SC2.0.1/libansi.a"); pragma LINK_WITH("/apps/lang/SC2.0.1/libm.a"); Pragma to interface the ada to the fortran: pragma INTERFACE(FORTRAN, interface); Pragma to allow ada to link with the fortran module being called: pragma LINK_WITH("interface.o"); Actual call to the fortran code. All parameters are records: interface( A'Address, B'Address, C'Address, D'Address); The command being used to link the code is as follows: a.ld interface_test -o interface_test -L/apps/lang/SC2.0.1 -lF77 -lansi -lm NOTE: interface_test is the name of the Ada procedure that contains the above declarations. I would apreciate any light you may be able to shed on this problem. I have tried to many things to mention and can't get rid of this message. Any suggestions on how to isolate the problem would also be apreciated. Thanks in advance, Keith Euler (keuler@skopen.dseg.ti.com)