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

Re: 20020311: netCDF-3.5.0 C++ bug report



>To: address@hidden
>From: Andy Jacobson <address@hidden>
>Subject: netCDF-3.5.0 C++ bug report
>Organization: Princeton
>Keywords: 200203110255.g2B2tKa15852 netCDF 3.5 g++ 3.0

Hi Andy,

>         I wish to report what appears to be a bug in the C++ code for
>         netCDF-3.5.0.  This code compiles under g++ versions 2.x, but
>         will not compile under g++ version 3.0.x.
> 
> In file included from /usr/include/netcdf.hh:1
> /usr/include/netcdfcpp.h:157: friend declaration requires class-key, i.e. 
>    `friend class NcFile'
> /usr/include/netcdfcpp.h:360: friend declaration requires class-key, i.e. 
>    `friend class NcFile'
> /usr/include/netcdfcpp.h:391: friend declaration requires class-key, i.e. 
>    `friend class NcFile'
> 
>         It appears the the "friend NcFile;" declaration is perhaps no
>      longer valid C++ syntax?  I changed the three instances to
>      "friend class NcFile" and everything worked just fine.

Yes, this is fixed in the netCDF 3.5.1-beta release, available from 

  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.5.1-beta.tar.Z

We hope to have a netCDF-3.5.1 release soon, but the C++ interface is
one of the main hangups, because of old C++ compilers that can't
understand the "include <iostream>" syntax and namespaces.  There will
probably be another beta release with C++ changes for
standard-conformance before the final 3.5.1 release.

--Russ