[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #IBK-149994]: (No Subject)

> Hi I'm Elelwani from South African Weather Service.

Hi Elwani,

> I'm trying to install netcdf 3.6.1 but when I run the make I get the error
> as highlighted below.
> c++ -c -g -O2 -I../libsrc -I. -I..   -DpgiFortran ncvalues.cpp
> ncvalues.cpp: In member function Ãvirtual char* 
> NcValues_ncbyte::as_string(long int) constÃ:
> ncvalues.cpp:236: error: Ãstrncpyà was not declared in this scope
> ncvalues.cpp: In member function Ãvirtual char* 
> NcValues_char::as_string(long int) constÃ:
> ncvalues.cpp:244: error: Ãstrncpyà was not declared in this scope

That's an old and unsupported version of netCDF from February 2006, so
my first suggestion would be to use the 3.6.3 version that had several
C++ fixes in it, such as including support for C strings in a portable
way.  Those fixes are also in the later 4.1.3 netCDF version that you
could build with --disable-netcdf-4 to get only the netCDF-3 interfaces
and still get the C++ library included.  If you get later versions than 
that, such as the most recent 4.3.0, the C and C++ interfaces are separate,
so you will first have to build and install the 4.3.0 library with
--disable-netcdf-4, then build and install the legacy netCDF C++ library 
version 4.2, telling it where to find the netCDF C library.

All these more recent library versions are available from


or from



Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu

Ticket Details
Ticket ID: IBK-149994
Department: Support netCDF
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.