Interfacing FORTRAN with C

Raj Kumar Singh singh at unc.cs.unc.edu
Wed Dec 21 01:39:42 AEST 1988


I think this question has been brought up before and so
I would like to exchange info with some one who can provide
helpful pointers on the issue of interprocedure calls between
C program and FORTRAN routines.

The specifics are as follows:

System: VaxStation-3200 running Ultrix-2.1.  


C-program {tt.c}
*******************************
#include <stdio.h>

main()
{
    extern void hello_();

    hello_();
}
*******************************

FORTRAN routine {hello.f}
*******************************

	subroutine hello()
	print *, "Hello world"
	return
	end
*******************************


This compiles without error on a Vaxes but on execution
does not print the message "hello world".  On the other hand,
the same program when compiled and run on Sun-3s and 4s works
fine.  Can someone provide more insight into this problem?
Is there anything special that I need to do on Ultrix system
in terms of loading?

Any help will be much appreciated.

Thanx !!!

------------------------------------------------------------
Raj Kumar Singh		singh at cs.unc.edu	(919) 962-1744



More information about the Comp.lang.c mailing list