[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 20010222: porting problems of netcdf-3
- Subject: Re: 20010222: porting problems of netcdf-3
- Date: Thu, 22 Feb 2001 14:12:58 -0700
>To: address@hidden
>From: Nikolopoulos Lambros <address@hidden>
>Subject: porting problems of netcdf-3
>Organization: UCAR/Unidata
>Keywords: 200102221834.f1MIYVL23846
Hi Lambros,
> I have been using netCDF for formation of my data the last 3
> years and ported the library in varius machines as,
> IBM RS6000/AIX, IBM SP2/AIX, Linux RedHat, ...
>
> Recently, I downloaded the new version and ported it in
> a CRAY T3E/1200 vendor-CC (CINECA Bologna, Italy),
> pc, RedHat 7.0/g++ without any problems.
> Trying to compile in IBM SP3 machines, however a problem
> were encountered.
> When i tried 'make' ('the ./configure worked) the compiler
> refuses the declaration 'friend' in cxx/netcdf.cc file.
> Any idea ?
> The result of 'uname -a'
> sp> uname -a
> AIX sp101 3 4 000506604C00
> The content of VERSION
> sp> more VERSION
> 3.4
> sp> which xlC
> /usr/bin/xlC
>
> and as attachment file i send the redirection of
>
> sp>./configure > configure.log
> ps> make >& make.log
> as well as the config.log file.
Yes, there was a non-standard use of the "friend" qualifier in the C++
code (it tried to declare a constructor a friend, but friend can only
be used with a Class's methods and a constructor is not really a
method). We fixed the problem in netcdf-3.5beta8, which you could
try. Just get it from
ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.5-beta8.tar.Z
Or if you just want to fix the code in version 3.4, you can use the
appended patch to netcdf.hh, which is now named netcdfcpp.h
--Russ
netcdf-3/src/cxx$ cvs diff -r1.1 netcdfcpp.h
Index: netcdfcpp.h
===================================================================
RCS file: /upc/share/CVS/netcdf-3/cxx/netcdfcpp.h,v
retrieving revision 1.1
retrieving revision 1.5
diff -r1.1 -r1.5
7c7
< * $Header: /upc/share/CVS/netcdf-3/cxx/netcdfcpp.h,v 1.1 1998/10/28
17:10:21 russ Exp $
---
> * $Header: /upc/share/CVS/netcdf-3/cxx/netcdfcpp.h,v 1.5 2001/02/05
> 20:29:12 russ Exp $
113a114
> FillMode the_fill_mode;
156,161c157
< friend NcFile::NcFile( const char *, NcFile::FileMode, size_t* = NULL,
< size_t = 0 );
< friend NcBool NcFile::sync( void );
< friend NcDim* NcFile::add_dim( NcToken, long );
< // to delete dimensions, since destructor is private
< friend NcBool NcFile::close( void );
---
> friend NcFile;
364,374c360
< friend NcFile::NcFile( const char *, NcFile::FileMode,
< size_t* = NULL, size_t = 0);
< friend NcBool NcFile::sync( void );
< friend NcVar* NcFile::add_var( NcToken varname, NcType type,
< const NcDim*,
< const NcDim*,
< const NcDim*,
< const NcDim*,
< const NcDim*);
< friend NcVar* NcFile::add_var( NcToken, NcType, int,
< const NcDim** );
---
> friend NcFile;
405,406c391
< friend NcFile::NcFile( const char *, NcFile::FileMode,
< size_t* = NULL, size_t = 0);
---
> friend NcFile;