I'm using the cpp
interfaces. It requires you first install the basic netCDF C class
and then install the interface for cpp
, because the cpp
interface is based on the classic model.html
netcdf.h
is the header file for C
interface; netcdfcpp.h
is the older version of CPP
version, and the newest version will use the header file netcdf
instead.c++
Interfaces differ greatly between versions.git
Use HomeBrew to install the package. Make sure you have the parameter. This is important to add support for c++.brew install netcdf --with-cxx-compat
github
Thanks to CodingAnarchy's question, I found the missing parameter as followed. Otherwise, error keeps apearing that linking command fails
.g++ test.cpp -lnetcdf_c++4
ide
NetCDF4 C++ APIhomebrew
brew doctor
to analyze your condition of brew packagesip
11/14/2016 Weiming