Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site imsvax.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!cvl!elsie!imsvax!leung From: leung@imsvax.UUCP (Aldrin Leung) Newsgroups: net.unix-wizards Subject: C calls FORTRAN subroutine Message-ID: <248@imsvax.UUCP> Date: Thu, 11-Oct-84 17:07:04 EDT Article-I.D.: imsvax.248 Posted: Thu Oct 11 17:07:04 1984 Date-Received: Sat, 13-Oct-84 02:17:17 EDT Organization: IMS Inc, Rockville MD Lines: 34 I have difficulty to use a C main program to call a Fortran subroutine that have I/O and would like anybody have related experience to give me some help. I usually don't read mail under unix.wizard. Please send mail to me. The following is what I did. In the C program, I have ---------- #includemain() { try_() } ---------- In the Fortran program, I have ---------- subroutine try write (6,100) 100 format ("subprogram") end ---------- I use "cc -c main.c", "f77 -c try.f", and "cc main.o try.o -lF77 -lU77 -lI77" No output like "subprogram" is printed. Thanks in advance! Aldrin Leung ...umcp-cs!eneevax!imsvax!leung or ...umcp-cs!cvl!elsie!leung