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

20030116: netCDF library link problem: missing f77 interface



Ashish,

>Date: Thu, 16 Jan 2003 15:09:45 -0500
>From: ashish arora <address@hidden>
>Organization: University of Kent
>To: Steve Emmerson <address@hidden>
>Subject: RE: 20030113: netCDF library link problem: missing f77 interface

The above message contained the following:

> (1) These are the commands which I ran to get the pathname for directory of 
> the netcdf package:
> 
> [aarora@snowy aarora]$ cd netcdf-3.5.0
> [aarora@snowy netcdf-3.5.0]$ cd src
> [aarora@snowy src]$ grep prefix macros.make
> prefix          = /home/aarora/netcdf-3.5.0
> exec_prefix     = $(prefix)
> INCDIR          = $(exec_prefix)/include
> LIBDIR          = $(exec_prefix)/lib
> BINDIR          = $(exec_prefix)/bin
> MANDIR          = $(prefix)/man
> 
> (2) The command which I am using to run the "odbtest" which is in directory 
> called "odb"; after having made all the correction and changes, as directed 
> by 
> you is
> 
> $g77 odbtest.f libodb.a libnetcdf.a -o odbtest.out
> 
> "libodb.a" contains all the compiled subroutines which are called in 
> "odbtest.f".

Change the link-command to the following:

    g77 -o odbtest.out odbtest.f -lodb -L/home/aarora/netcdf-3.5.0 -lnetcdf

You should be able to read about the "-L" and "-l" options in the g77(1)
manual page.

> Best Regards,
> Ashish

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>