This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Karen, You're the second person to report this problem. Apparently, version 3.0 of the GNU C++ compiler behaves differently than the 2.x versions. Unfortunately, our resident C++ netCDF expert, Russ Rew, won't be in until next week. You should expect to hear from him then. Regards, Steve Emmerson <http://www.unidata.ucar.edu> > To: address@hidden > From: Karen Cooper <address@hidden> > Subject: netcdf 3.5.0 and gcc-3.0 > Organization: UCAR/Unidata > Keywords: 200107261704.f6QH4K110141 > > I'm having a little trouble compiling here. I managed to get past the first > problem rather easily by modifying the header file > netcdf-3.5.0/src/cxx/netcdfcpp.h on three lines numbered 157, 360 and 391 to > make : > > friend NCfile > > now read: > > friend class NcFile > > > The next problem is as follows, and I'll put in your desired format. Any > insight into the problem would be appreciated. > > A: SunOS stholly 5.7 Generic_106541-14 sun4u sparc SUNW,Ultra-5_10 > > B: 3.5.0 > > C: /usr/local/bin/gcc /usr/local/bin/g++ /usr/local/bin/g77 > These are version 3.0 of the Gnu compilers ... > Making `all' in directory /usr/local/netcdf-3.5.0/src/cxx > > make[2]: Entering directory `/usr/local/netcdf-3.5.0/src/cxx' > g++ -c -ftemplate-depth-25 -g -O2 -I../libsrc -I. -Df2cFortran netcdf.cpp > g++ -c -ftemplate-depth-25 -g -O2 -I../libsrc -I. -Df2cFortran 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) > make[2]: *** [ncvalues.o] Error 1 > make[2]: Leaving directory `/usr/local/netcdf-3.5.0/src/cxx' > make[1]: *** [subdir_target] Error 1 > make[1]: Leaving directory `/usr/local/netcdf-3.5.0/src' > make: *** [cxx/all] Error 2 > > > ************************************************** > > Q. How many surrealists does it take to change a lightbulb? > A. Two, One to hold the giraffe, and the other to fill the bathtub > with brightly colored machine tools. > > Author Unknown > > > *************************************************** > Karen Cooper > WATADS Support - NSSL > address@hidden > Office: (405)366-0434 > Mobile: (405)834-8559 > ***************************************************