NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GEMPAK #TFE-467943]: GEMPAK - problem with linking to gemlib.a



Ying,

> ermmsg.o(.text+0x664): undefined reference to `css_gtim_'

You need to add cgemlib.a to your link line libraries.

The er_wmsg_ routine is calling the css_gtim function from the
cgemlib.a library.

The comment about using the gcc linker is based on how Fotran routines
can call C routines and whether the linker is looking for the "_"
character following the subroutine name. As long as your link line can
resolve the dependencies, you can use other linkers.

Steve Chiswell
Unidata User Support 



> Institution: Washington State University
> Package Version: 5.9.1
> Operating System: linux (2.4.18-asmp) running RedHat7.2
> Hardware Information: Athlon
> Inquiry: Hi,
> 
> I am trying to compile some FORTRAN programs that use Gempak library. When 
> the complier tries to link to gemlib.a, it gives some undefined reference 
> errors. I tried the precompiled library and also to recompile by myself using 
> the given Makefile for Linux, but they all gave me the same error:
> 
> /master/home/ying_xie/tools/GEMPAK5.9.1/os/linux/lib/gemlib.a(ermmsg.o): In 
> function `er_mmsg_':
> ermmsg.o(.text+0x664): undefined reference to `css_gtim_'
> 
> 
> The Makefile I used to compile the Fortran program looks like:
> 
> FC=pgf90
> LD=pgf90
> FFLAGS= -c -byteswapio -DLinux -O
> LDFLAGS = -lgcc -lg2c
> LDOPTIONS =
> LINKFLAGS =  -lgcc -lg2c -Bstatic
> GEMLIB = /master/home/ying_xie/tools/GEMPAK5.9.1/os/linux/lib
> LIBS=$(GEMLIB)/gemlib.a $(GEMLIB)/appl.a $(GEMLIB)/syslib.a \
> $(GEMLIB)/gemlib.a
> 
> Did I miss something in my Makefile?  Or do I need to compile Gempak 
> differently? I read an old email saying that if I compiled Gempak using 
> gcc/g77, then I have to use that linker as well. So I added �lgcc 
> �lg2c. So I added those, but still didn�t solve the problem.
> 
> Thanks
> 
> Ying
> 
> 
> 
> 


Ticket Details
===================
Ticket ID: TFE-467943
Department: Support GEMPAK
Priority: Normal
Status: Closed