This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: Paul Markowski <address@hidden> >Organization: UCAR/Unidata >Keywords: 200111271600.fARG00N17889 > >Hi, > >Can you tell me how to compile f77 code containing calls to gempak >subroutines (e.g., sf_opnf, sf_tstn, sf_rdat)? I.e., what libraries to I >need to link to, and are all of these in $GEMLIB? I'm running Red Hat >linux 7.0, for what it's worth. > >Thanks, >Paul Markowski > >__________________ >Dr. Paul Markowski >Department of Meteorology >Pennsylvania State University >503 Walker Building >University Park, PA 16802 >email: address@hidden >phone: (814) 865-0478 >fax: (814) 865-3663 >web: http://www.meteo.psu.edu/~marko/ > > > Paul, The routines that start with xx_xxxx() are all in gemlib.a. However, these routines may call other routines in other libraries - typically cgemlib.a or the GEMPLT routines via appl.a. The general g77 definitions in $CONFIGDIR/Makeinc.linux for compiling use the flag: -fno-second-underscore A typical compile line would look like: g77 -fno-second-underscore (your source).o $GEMLIB/gemlib.a $GEMLIB/appl.a \ $GEMLIB/syslib.a $GEMLIB/cgemlib.a $GEMLIB/gemlib.a You can take advantage of the platform configurations already defined in the $CONFIGDIR by following the Makefile example such as $GEMPAK/source/programs/sf/sflist/Makefile. Steve Chiswell