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.
--- Begin Message ---Hi Russ,
- Subject: Re: [netcdf-porting] ERROR in linking netcdf libraries (ld: 0711-317 ERROR: Undefined symbol: .nf_open)
- Date: Sat, 13 Oct 2012 10:04:49 +0530
Thank you so much for your help. The problem is now solved.
With regards,
ARUN RAMANATHAN.SOn Sat, Oct 13, 2012 at 2:40 AM, Russ Rew <address@hidden> wrote:
Arun,
but that's wrong, the proper order is
I wrote:
> I think you merely need to add -lnetcdff (Note the extra "f") to the end
> of the linker flags, after "-lnetcdf", to make sure the separate netCDF
> Fortran library is searched. That's assuming you compiled version 4.1.3
> in a way that built the netCDF library, that is using FC=xlf90r and not
> using --disable-fortran and making sure the Fortran library was built,
> tested, and installed.
-L/home/mandal/arun/netcdf/lib -lnetcdff -lnetcdf
because the netCDF Fortran library calls functions in the C library,
so must appear prior to the C library on the linker arguments.
Sorry about that ...
--Russ
--- End Message ---