[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 ---
  • To: Russ Rew <address@hidden>
  • Subject: Re: [netcdf-porting] ERROR in linking netcdf libraries (ld: 0711-317 ERROR: Undefined symbol: .nf_open)
  • From: Arun Ramanathan <address@hidden>
  • Date: Sat, 13 Oct 2012 10:04:49 +0530
  • Delivery-date: Fri Oct 12 22:34:51 2012
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 ---

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.