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

Re: netCDF C++ problems



> Organization: Laboratory for Plasma Studies, Cornell University
> Keywords: 199402152241.AA01742

Hi Mike,

> failure to make c++ examples. . .
> 
> I am using a sun sparcstation running sparc-sun-sunos4.1.1
> 
> I was trying to make the c++ examples in netcdf-2.3.2/c++ using
> gcc-2.5.8, but failed with the following output from 'make all'.
> 
> //Start output
> gcc -g -I/home/solar/rilee/include  -sun4 -c  netcdf.cc
> In file included from netcdf.hh:14,
>                  from netcdf.cc:12:
> ncvalues.hh:20: conflicting types for `unsigned char'
> /home/solar/rilee/include/netcdf.h:281: previous declaration as `char'

The problem was in an "ncbyte" typedef added to the C interface just before
netcdf 2.3.2 was released.  Here's a reply I sent to another user about this
earlier, that I've jsut retrieved from our gopher index on netcdf support
mail:

    It turns out that it was a mistake to add the typedefs for ncbyte, ncchar,
    ncshort, ncfloat, and ncdouble to netcdf.h when version 2.3.2 was released,
    and we've taken out these typedefs from netcdf.h for the next release,
    leaving in the typedef for nclong.  None of these was documented except for
    nclong, and none is currently used in any C netcdf software, as far as we
    know.

    Thus if you merely delete the statement

        typedef char    ncbyte;

    from netcdf.h, I think the C++ interface will work OK.  Please let me know
    if you have any other problems with it.

Since the 2.3.2 release, I've fixed several other minor bugs and memory
leaks in the C++ interface.  If you get the example running OK and determine
you want to use the C++ interface, I could send you a patch file or tar up
the new sources as a stopgap until we get time to put together another
release (in two or three months).  Currently I'm looking for more feedback
on the C++ interface, since there is only one other group actively using it.

__________________________________________________________________________
                      
Russ Rew                                              UCAR Unidata Program
address@hidden                                        P.O. Box 3000
(303)497-8645                                 Boulder, Colorado 80307-3000