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

[netCDF #MLU-486882]: NetCDF must be built with netCDF-4 enabled



Hi Rakia,

> I would like to convert netCDF files to Ascii using C++ as described here:
> 
> http://www.unidata.ucar.edu/software/netcdf/examples/programs/
> 
> I have downloaded the netCDF C++ source code from here:
> 
> http://www.unidata.ucar.edu/downloads/netcdf/netcdf-cxx/index.jsp

Which of the two netCDF C++ distributions did you download?  One is labelled
"NetCDF-4 C++ Source Code" and the other "Legacy NetCDF-3 C++ Source Code".
If you downloaded the first, it requires that the netCDF C library has already
been built and installed somewhere (for example in lib/, bin/, and include/
subdirectories under /usr/local).  The second "legacy C++" API is adequate for
reading and writing netCDF-3 files, which are still the majority of netCDF data.
But it still requires that the netCDF-3 library is installed first.

> and encounter a problem when configuring.
> 
> I have set CPPFLAGS="-I /usr/local/netcdf/include" and LDFLAGS="-L
> /usr/local/netcdf/lib". When I then run ./configure, I get the error
> message "NetCDF must be built with netCDF-4 enabled". I found another
> couple of threads where the same problem is mentioned, so I also
> set "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib" and "export
> LD_LIBRARY_PATH", however, the same error message keeps appearing.

I think for MacOS-X, you need to set DYLD_LIBRARY_PATH instead of
LD_LIBRARY_PATH.

Please let us know if this helps.

--Russ

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



Ticket Details
===================
Ticket ID: MLU-486882
Department: Support netCDF
Priority: Normal
Status: Closed


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.