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

20030220:netCDF 3.5: friend declaration requires class-key



Val,

> To: <address@hidden>
> From: "Val Schmidt" <address@hidden>
> Subject: netCDF 3.5 compile error
> Organization: UCAR/Unidata

The above message contained the following:

> I'm attempting to compile netCDF as part of a GMT install.  I'm being
> adventurous as attempting the install on cygwin installed on top of WinXP.
> 
> GMT has it's own install script, so I'm working from that and it fails
> during the compile process of netCDF.  I've logged the results of the script
> and attached them to this email.  I think you can skip right to the bottom
> and see the following:
> ___________________________________________________________________
> Making `all' in directory /usr/local/gmt/netcdf-3.5.0/src/cxx
> 
> make[2]: Entering directory `/usr/local/gmt/netcdf-3.5.0/src/cxx'
> c++ -c  -I../libsrc -I.  -DNDEBUG netcdf.cpp
> In file included from /usr/include/c++/3.2/backward/iostream.h:31,
>                  from ncvalues.h:13,
>                  from netcdfcpp.h:16,
>                  from netcdf.cpp:12:
> /usr/include/c++/3.2/backward/backward_warning.h:32:2: warning: #warning
> This file includes at least one deprecated or antiquated header. Please
> consider using one of the 32 headers found in section 17.4.1.2 of the C++
> standard. Examples include substituting the <X> header for the <X.h> header
> for C++ includes, or <sstream> instead of the deprecated header
> <strstream.h>. To disable this warning use -Wno-deprecated.
> In file included from netcdf.cpp:12:
> netcdfcpp.h:157: friend declaration requires class-key, i.e. `friend class 
>    NcFile'
> netcdfcpp.h:360: friend declaration requires class-key, i.e. `friend class 
>    NcFile'
> netcdfcpp.h:391: friend declaration requires class-key, i.e. `friend class 
>    NcFile'
> make[2]: *** [netcdf.o] Error 1
> make[2]: Leaving directory `/usr/local/gmt/netcdf-3.5.0/src/cxx'
> make[1]: *** [subdir_target] Error 1
> make[1]: Leaving directory `/usr/local/gmt/netcdf-3.5.0/src'
> make: *** [cxx/all] Error 2
> ____________________________________________________________________________

This error has been reported.  You can see it at

    http://www.unidata.ucar.edu/glimpsedocs/ghnetcdf.html

Enter "friend declaration" in the search-box.

The solution is to use the latest "beta" release at

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

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>