Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Mixed language programming summary
@ 1994-08-08 16:38 Phil Neal
  0 siblings, 0 replies; only message in thread
From: Phil Neal @ 1994-08-08 16:38 UTC (permalink / 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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1994-08-08 16:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-08-08 16:38 Mixed language programming summary Phil Neal

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