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

[netCDF #LLV-851787]: netcdf 4.1.2 issue: undefined reference to `netcdf_mp_nf90_open_', etc

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.


  • Subject: [netCDF #LLV-851787]: netcdf 4.1.2 issue: undefined reference to `netcdf_mp_nf90_open_', etc
  • Date: Wed, 13 Feb 2013 13:05:17 -0700

Hi Sha,

I think the problem may be that the  Fortran library must now be explicitly 
linked, 
whereas previous releases allowed the Fortran library to be built right into 
the 
C library.  That means instead of just linking with "-lnetcdf", you need to use
"-lnetcdff" (note the extra "f" in the first library name).

If you build with shared libraries (the default) then this is all thatis 
necessary.  
If you build with static libraries only, then you must also specify "-lnetcdf" 
after 
"-lnetcdff" and any other libraries that were used when netCDF was built.

--Russ


Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: LLV-851787
Department: Support netCDF
Priority: Normal
Status: Closed