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

Arun Ramanathan: Re: [netcdf-porting] ERROR in linking netcdf libraries (ld: 0711-317 ERROR: Undefined symbol: .nf_open)



--- Begin Message ---
  • 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
Hi Russ,
               Thank you so much for your help. The problem is now solved.

With regards,
ARUN RAMANATHAN.S

On Sat, Oct 13, 2012 at 2:40 AM, Russ Rew <address@hidden> wrote:
Arun,

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.

but that's wrong, the proper order is

   -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 ---