Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!caip!brl-adm!brl-smoke!smoke!johnston@lbl-csam.arpa From: johnston@lbl-csam.arpa (Bill Johnston [csam]) Newsgroups: net.unix-wizards Subject: linking C and Fortran Message-ID: <2662@brl-smoke.ARPA> Date: Wed, 30-Jul-86 02:53:26 EDT Article-I.D.: brl-smok.2662 Posted: Wed Jul 30 02:53:26 1986 Date-Received: Thu, 31-Jul-86 01:59:03 EDT Sender: news@brl-smoke.ARPA Lines: 25 What needs to be done (other than ensuring consistent data types for args) in order to link C and/or Fortran main programs and routines with each other? How do the necessary libraries get specified at link time (manually?), and what else needs to be done? I mostly need to call Fortran from C, but visa versa also. For example: f77 -c forsub.f forsub.f: forsub: cc -c cmain.c cc cmain.o forsub.o -o cmain Undefined: _forsub I could understand why there might be some missing Fortran references generated in forsub since cc doesn't reference the Fortran library. But why isn't forsub found? Any help or pointers to information would be appreciated. Thanks, Bill Johnston [wejohnston@lbl.arpa, ...ucbvax!lbl-csam!johnston]