脚本宝典收集整理的这篇文章主要介绍了Install netCDF under mac os,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
Tips worth of notice
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.
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.
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
以上是脚本宝典为你收集整理的Install netCDF under mac os全部内容,希望文章能够帮你解决Install netCDF under mac os所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。