[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 20010723: netcdf 3.5.0 and gcc 3.0
- Subject: Re: 20010723: netcdf 3.5.0 and gcc 3.0
- Date: Wed, 01 Aug 2001 15:23:25 -0600
>To: address@hidden
>From: Karen Cooper <address@hidden>
>Subject: netcdf 3.5.0 and gcc-3.0
>Organization: UCAR/Unidata
>Keywords: 200107261704.f6QH4K110141 200107232006.f6NK6T127994 netCDF 3.5 gcc
>3.0
Harry and Karen,
Here's a context-diff patch for this problem. Sorry it took so long.
I had to install gcc-3.0 first, and had some problems with shared
libraries. I haven't tested this on all the other C++ compilers yet,
so this may still change before it goes into netCDF 3.5.1, but this
works with gcc-3.0 on solaris-2.7-sparc ...
--Russ
cvs diff: Diffing .
Index: ncvalues.cpp
===================================================================
RCS file: /upc/share/CVS/netcdf-3/cxx/ncvalues.cpp,v
retrieving revision 1.3
diff -c -r1.3 ncvalues.cpp
*** ncvalues.cpp 1998/12/22 18:21:49 1.3
--- ncvalues.cpp 2001/08/01 21:17:14
***************
*** 304,310 ****
ostream& NcValues_float::print(ostream& os) const
{
! long save=os.flags();
os.precision(7);
for(int i = 0; i < the_number - 1; i++)
os << the_values[i] << ", ";
--- 304,310 ----
ostream& NcValues_float::print(ostream& os) const
{
! ostream::fmtflags save=os.flags();
os.precision(7);
for(int i = 0; i < the_number - 1; i++)
os << the_values[i] << ", ";
***************
*** 316,322 ****
ostream& NcValues_double::print(ostream& os) const
{
! long save=os.flags();
os.precision(15);
for(int i = 0; i < the_number - 1; i++)
os << the_values[i] << ", ";
--- 316,322 ----
ostream& NcValues_double::print(ostream& os) const
{
! ostream::fmtflags save=os.flags();
os.precision(15);
for(int i = 0; i < the_number - 1; i++)
os << the_values[i] << ", ";
> From: Harry Edmon <address@hidden>
> Subject: netcdf 3.5.0 and gcc 3.0
> Organization: University of Washington
> Keywords: 200107232006.f6NK6T127994 netCDF 3.5 gcc 3.0
>
> On a Sun running the new gcc 3.0 I get the following error in compiling netcdf
> 3.5.0:
>
> g++ -c -I../libsrc -I. -DNDEBUG ncvalues.cpp
> ncvalues.cpp: In member function `virtual std::ostream&
> NcValues_float::print(std::ostream&) const':
> ncvalues.cpp:313: no matching function for call to `std::basic_ostream<char,
> std::char_traits<char> >::flags(long int&)'
> /usr/local/include/g++-v3/bits/ios_base.h:311: candidates are:
> std::_Ios_Fmtflags std::ios_base::flags() const
> /usr/local/include/g++-v3/bits/ios_base.h:315:
> std::_Ios_Fmtflags std::ios_base::flags(std::_Ios_Fmtflags)
> ncvalues.cpp: In member function `virtual std::ostream&
> NcValues_double::print(std::ostream&) const':
> ncvalues.cpp:325: no matching function for call to `std::basic_ostream<char,
> std::char_traits<char> >::flags(long int&)'
> /usr/local/include/g++-v3/bits/ios_base.h:311: candidates are:
> std::_Ios_Fmtflags std::ios_base::flags() const
> /usr/local/include/g++-v3/bits/ios_base.h:315:
> std::_Ios_Fmtflags std::ios_base::flags(std::_Ios_Fmtflags)