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.
Hi, Sorry, but I'm not sure I understand your question. The translation to English produced by Google is: When after the installation finished netcdf-c version installed netcdf-c ++, after configure prompt NetCDF must be built with netCDF-4 enabled. netcdf-c version of the installation path has been configured to go, and ask how to solve these problems. If you are trying to build and install netCDF-C++, there are two very different versions of the library, which are incompatible, described here, under the heading "NetCDF C++ Releases": http://www.unidata.ucar.edu/downloads/netcdf/ The old "legacy" version from netcdf-cxx-4.2.tar.gz (which is no longer maintained and hasn't changed since September 2011) will build OK without netCDF-4, if you have a version of netCDF-3 already installed. For example, here's how I just built and installed it on an OSX platform: $ cd netcdf-cxx-4.2 $ NCDIR=/machine/russ/installs/netcdf-3 $ mkdir .build $ cd .build $ CPPFLAGS="-I${NCDIR}/include" LDFLAGS="-L${NCDIR}/lib" ./configure --prefix=/machine/russ/installs/ncxx42-nc3only $ CPPFLAGS="-I${NCDIR}/include" LDFLAGS="-L${NCDIR}/lib" ../configure --prefix=/machine/russ/installs/ncxx42-nc3only $ make $ make check $ make install The newer supported version from netcdf-cxx4-4.2.1.tar.gz (which was last changed in August 2013) requires a netCDF-4 library. If you try to compile it without netCDF-4 support, the configure script will issue an error message: $ NCDIR=/machine/russ/installs/netcdf-3 $ cd netcdf-cxx4-4.2.1 $ mkdir .build $ cd .build $ CPPFLAGS="-I${NCDIR}/include" LDFLAGS="-L${NCDIR}/lib" ../configure --prefix=/machine/russ/installs/ncxx4-421-nc3only ... configure: error: NetCDF must be built with netCDF-4 enabled. If it is built with a netCDF-4 library, it works OK: $ NCDIR=/machine/russ/installs/netcdf-4 $ CPPFLAGS="-I${NCDIR}/include" LDFLAGS="-L${NCDIR}/lib" ../configure --prefix=/machine/russ/installs/ncxx4-421 $ make all $ make check $ make install $ h The latest snapshot cloned from GitHub has some fixes and produces fewer warning messages from the C++ compiler, but also requires a netCDF-4 C library that has already been installed: https://github.com/Unidata/netcdf-cxx4/ $ git clone https://github.com/Unidata/netcdf-cxx4.git $ cd netcdf-cxx4 $ autoreconf -if # generated configure script $ mkdir .build $ cd .build $ NCDIR=/machine/russ/installs/netcdf-4 $ CPPFLAGS="-I${NCDIR}/include" LDFLAGS="-L${NCDIR}/lib" ../configure --prefix=/machine/russ/installs/ncxx4-421-dev $ make $ make check $ make install I hope this answers your question ... --Russ > ????netcdf-c??????netcdf-c++??configure???NetCDF must be built with netCDF-4 > enabled? > netcdf-c????????????????????????? Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: FKK-628661 Department: Support netCDF Priority: Normal Status: Closed