Tips worth of notice
I'm using the
cpp
interfaces. It requires you first install the basicnetCDF C class
and then install the interface forcpp
, because thecpp
interface is based on the classic model.netcdf.h
is the header file forC
interface;netcdfcpp.h
is the older version ofCPP
version, and the newest version will use the header filenetcdf
instead.Interfaces differ greatly between versions.
Installation
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
Compilation
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
Reference
Useful commands
brew doctor
to analyze your condition of brew packages
11/14/2016 Weiming
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。