Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Mixed language programming
@ 1994-08-01 22:35 Phil Neal
  1994-08-02  6:59 ` system PRIVILEGED account
  1994-08-02 14:02 ` Alexander Kovzelev
  0 siblings, 2 replies; 4+ messages in thread
From: Phil Neal @ 1994-08-01 22:35 UTC (permalink / raw)




Dear osf1/alpha people,

I have been having a problem trying to make a program with
a C main and a f77 subroutine. I have been through the man
pages and the dxbook stuff for f77. It gives examples for
f77 calling C but never C calling f77. Any pointers would
be extremely appreciated (no pun intended).


Here is the main:

extern testit_();
main()
{
testit_(); 
printf(" back again \n");
}

And here is the subroutine:


        subroutine testit()
        write(*,*) ' in testit'
        return
        end

Here is the make file:

test.exe:       test.o testit.o
        f77 -v test.o  testit.o -o test.exe
clean:
        rm *.o *.exe


Here is the error message:

_trieste_215% make
cc  -c test.c
f77  -c testit.f
f77 -v test.o  testit.o -o test.exe
/usr/bin/cc -v -o test.exe /usr/lib/cmplrs/fort/for_main.o -O4
test.o testit.o -nocount -lUfor -lfor -lFutil -lm -lots 
/usr/lib/cmplrs/cc/ld -o test.exe -g0 -O4 -call_shared
/usr/lib/cmplrs/cc/crt0.o /usr/lib/cmplrs/fort/for_main.o test.o
testit.o -nocount -lUfor -lfor -lFutil -lm -lots -lc 
ld:
test.o: main: multiply defined
Unresolved:
MAIN__
0.0u 0.0s 0:00 60% 0+8k 3+5io 22pf+0w
fort: Severe: Failed while trying to link.
*** Exit 1
Stop.


Phil



----------------------------------------------------------------
Phil Neal, Systems Programmer, Statistics Department GN-22
University of Washington, Seattle, Wa. 98195 USA  | 206-685-1627
http://www.stat.washington.edu/phil.html
----------------------------------------------------------------
Those who would repeat the past must control the teaching of history.
(Bene Gesserit Coda)


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Mixed language programming
@ 1994-08-01 14:37 Phil Neal
  0 siblings, 0 replies; 4+ messages in thread
From: Phil Neal @ 1994-08-01 14:37 UTC (permalink / raw)




Dear osf/alpha people,

Does anyone have refereces to or examples of 
mixed language programming on alphas. In particular,
I am looking for examples in Fortran and C of passing
arrays, scalars, and strings (is there anything else in life ?).

Thanks,

Phil



----------------------------------------------------------------
Phil Neal, Systems Programmer, Statistics Department GN-22
University of Washington, Seattle, Wa. 98195 USA  | 206-685-1627
http://www.stat.washington.edu/phil.html
----------------------------------------------------------------
Those who would repeat the past must control the teaching of history.
(Bene Gesserit Coda)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1994-08-02 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-08-01 22:35 Mixed language programming Phil Neal
1994-08-02  6:59 ` system PRIVILEGED account
1994-08-02 14:02 ` Alexander Kovzelev
  -- strict thread matches above, loose matches on Subject: below --
1994-08-01 14:37 Phil Neal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox