From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,1c1a25674f306473 X-Google-Attributes: gid1164f8,public From: eillihca@drizzle.StanFord.EDU ( Achille Hui, the Day Dreamer ) Subject: Re: Calling C function from FORTRAN on Alpha Date: 1995/07/06 Message-ID: #1/1 X-Deja-AN: 105730602 references: organization: Dept. of Physics, Stanford University. x-transfer-agent: nntp.stanford.edu (NNTP) newsgroups: comp.sys.dec +---In --- | sinda@indirect.com (Ron Behee) writes... +--------- | I need to call a small c function from FORTRAN. I just need to pass a i... | back. Does anyone know where I can find a sample problem doing this??? | Following works on a DEC 3000/600 running OSF/1 2.0: # cat a_f.f program test external a integer*4 i i = 2 call a(i) write(6,*) i stop end # cat a_c.c void a_(int *i){ *i = 1; } # cc -c a_c.c # f77 -o a.out a_f.c a_c.o # a.out 1