Install netCDF under mac os
文章目录
Tips worth of notice
I'm using the
cppinterfaces. It requires you first install the basicnetCDF C classand then install the interface forcpp, because thecppinterface is based on the classic model.netcdf.his the header file forCinterface;netcdfcpp.his the older version ofCPPversion, and the newest version will use the header filenetcdfinstead.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 doctorto analyze your condition of brew packages
11/14/2016 Weiming
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论