Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: neal@trieste.stat.washington.edu (Phil Neal)
Subject: Mixed language programming summary
Date: 8 Aug 1994 16:38:22 GMT	[thread overview]
Message-ID: <325n1u$rm1@news.u.washington.edu> (raw)

Dear osf1/alpha people,

My original problem was how to get rid of all the error messages
when linking a C main with a Fortran subroutine.

Thanks to all who replied !! In summary, check out the following:

1.      Use  -nofor_main if you have a C main routine. This
        gets rid of the "MAIN__" unresolved problem.

         f77 -v test.o testit.o -o test.exe  -nofor_main

2.      Use -assume-no-underscore if you don't want to hassle the
        trailing underscores.

3.      Use for_rtl_init_ and for_rtl_finish_ as magic mojo to clean
        up after poorly implemented fortran i/o.


4.      link with cc but include the -lfor library:

        test.exe:       test.o testit.o
        #       f77 -v -nofor_main  testit.o  test.o 
                cc -o test.exe test.o testit.o -lfor
        clean:  
                rm *.o *.exe

5.      This makefile also worked:

        CC=     cc
        LIBS=   -lUfor -lfor -lFutil -lm -lots -lc

        test.exe:       test.o testit.o
                $(CC) -v test.o  testit.o -o test.exe $(LIBS)
        clean:
                rm *.o *.exe


Many thanks to:



Dan Riley
Castor Fu
Tom Milac
Allen Cohen
Rudolf Gabler
David Warren
Dr. Thomas P. Blinn
Richard H. Broberg
jim@ilo.dec.com
Peter Schmitzberger
Jorge Pizarro 

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)


                 reply	other threads:[~1994-08-08 16:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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