Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: lionel@quark.zko.dec.com (Steve Lionel)
Subject: Re: cc and f77 linking : libraries required ?
Date: 1996/08/27	[thread overview]
Message-ID: <4vvir4$q9t@nntpd.lkg.dec.com> (raw)
In-Reply-To: 4vsbeb$d3g_001@iroe.fi.cnr.it



In article <4vsbeb$d3g_001@iroe.fi.cnr.it>, menca@iroe.iroe.fi.cnr.it 
(Dr Francesco Mencaraglia) writes:
|>sorry if this question has been already posed N times ( N >> 1), but I could 
|>not find the answer in the osf FAQ. I am trying to compile a C programs which
|>calls fortran-77 routines.  what I do is:
|>f77 -c routine.f
|>cc -c programc
|>cc program.o routine.o -lUfor -lfor -lm
|>but I get a few unresolved symbols (something like _Ots....); inspecting 
|>/usr/lib I found some libraries libots.a libots2.a but this was not enough.

Use the f77 driver to do the linking.  It will add the proper libraries.
You must also add -nofor_main if the main program is not Fortran.   You can
use the f77 driver to compile the C code as well.  For example:

  f77 -nofor_main routine.f program.c

For further information, please see the Digital Fortran User Manual.
-- 

Steve Lionel                      mailto:lionel@quark.zko.dec.com
Fortran Development               http://www.digital.com/info/slionel.html
Digital Equipment Corporation     
110 Spit Brook Road, ZKO2-3/N30    
Nashua, NH 03062-2698             "Free advice is worth every cent"

For information on Digital Fortran, see http://www.digital.com/info/hpc/fortran/



  parent reply	other threads:[~1996-08-27  4:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-26  4:00 cc and f77 linking : libraries required ? Dr Francesco Mencaraglia
1996-08-27  4:00 ` Ian Mortimer
1996-08-27  4:00 ` Steve Lionel [this message]
1996-08-28  4:00 ` John Reinitz
1996-08-29  4:00   ` Steve Lionel
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