一、下载所需要的资源
a.使用的netcdf的C++接口版本:netcdf-cxx-4.2.tar.gz,下载地址:http://www.unidata.ucar.edu/downloads/netcdf/netcdf-cxx/index.jsp
b.下载需要的库文件:netCDFcpp.zip,下载地址:http://s.pudn.com/search_hot.asp?k=NetCDF#
二、项目的创建
a.解压下载的netcdf-cxx-4.2.tar.gz文件,得到cxx,example,m4和man4文件,还有一些其他配置文件;
b.将解压后文件中的config.h.in这个文件名改成config.h;
c.创建工程项目,然后以添加现有项的方式分别将需要的config.h和cxx文件夹中的ncvalues.h,netcdfcpp.h和ncvalues.cpp,netcdf.cpp这五个文件添加到工程头文件和源文件中;
三、项目的配置
a.包含文件:在VS项目属性—VC++目录