Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!caip!brl-adm!brl-smoke!smoke!moss@BRL.ARPA From: moss@BRL.ARPA (Gary S. Moss (SLCBR-VLD-V)) Newsgroups: net.unix-wizards Subject: Re: linking C and Fortran Message-ID: <2668@brl-smoke.ARPA> Date: Wed, 30-Jul-86 12:47:09 EDT Article-I.D.: brl-smok.2668 Posted: Wed Jul 30 12:47:09 1986 Date-Received: Thu, 31-Jul-86 20:39:46 EDT Sender: news@brl-smoke.ARPA Lines: 10 Bill, CC prepends an underscore to the function name, and F77 appends an underscore. So, to call Fortran from C, name the function _forsub in the Fortran module, invoke it as forsub_ in the C module. You may have to shorten the name to allow for the extra characters, depending on your linker. Conversely, define it as forsub_ in the C module, and invoke it as _forsub in the Fortran module. Be sure to define/invoke the function from C with pointers (call by reference) exclusively. -moss.