Compiling C++ with netcdf: ‘NC_CHUNKED’ was not declared

Hi!
I am trying to compile a c++ code which requires NetCDF4 libraries. I use:

Ubuntu 12.04.1 LTS,
the GNU compilers,
cmake version 2.8.7,
netcdf-4.0 (with netcdf4 enabled and specification of the zlib and hdf5 libraries) and
netcdf-cxx4-4.2.

My compiling error is:

In file included from /usr/local/include/netcdf:30:0, from /home/guessio_daily_netCDF.cpp:55:
/usr/local/include/ncVar.h:43:18: error: ‘NC_CHUNKED’ was not declared in this scope
/usr/local/include/ncVar.h:48:18: error: ‘NC_CONTIGUOUS’ was not declared in this scope

In file included from /usr/local/include/netcdf:30:0, from /home/guessio_daily_netCDF.cpp:55:
/usr/local/include/ncVar.h:64:18: error: ‘NC_NOCHECKSUM’ was not declared in this scope
/usr/local/include/ncVar.h:65:18: error: ‘NC_FLETCHER32’ was not declared in this scope


Line 55 of guessio_daily_netCDF.cpp is:
#include <netcdf>
using namespace netCDF;
using namespace netCDF::exceptions;

Do you have an idea how to fix this? Thank you very much in advance!

Cheers,
Chris
Topic archived. No new replies allowed.