Re: [netcdfgroup] F77 compiling & undefined NETCDF functions

Do an "nm -a /usr/local/lib/libnetcdf.a" and see what the symbols look like for those calls. My guess is that they have a trailing underscore, if so you need to set the compiler option so that it produces that when you compile the test program.

HTH,

-Roy M.

On Feb 7, 2008, at 4:32 PM, Bomin.Sun@xxxxxxxx wrote:


I compile simple_xy_rd.f (copied from netcdf-3.6.2/examples/F77 to my
home dir) by typing:
f77 simple_xy_rd.f -I/usr/local/include -L/usr/local/lib -lnetcdf

The error info I got is:
Error: Undefined symbol: .nf_open
Error: Undefined symbol: .nf_strerror
Error: Undefined symbol: .nf_inq_varid
Error: Undefined symbol: .nf_get_var_int
Error: Undefined symbol: .nf_close

I check the file netcdf.inc. it is under /usr/local/include.
And libnetcdf.a is under /usr/local/lib.

The netcdf version is netcdf-3.6.2. It is installed at the AIX system I
am working on.

Any suggestion for fixing the compilation errors?

Thanks
bomin
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: http:// www.unidata.ucar.edu/mailing_lists/

**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division 
Southwest Fisheries Science Center
1352 Lighthouse Avenue
Pacific Grove, CA 93950-2097

e-mail: Roy.Mendelssohn@xxxxxxxx (Note new e-mail address)
voice: (831)-648-9029
fax: (831)-648-8440
www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."





  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: