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

Re: netCDF C++ problems



> Organization: Cornell
> Keywords: 199402171506.AA08891

Mike,

> >> gcc-2.5.8, but failed with the following output from 'make all'.
> >>
> 
> Deleting the typdef clears up the problem of making netcdf, but I am still
> having a problem with c++.  The output of make all in c++ is:
> 
> gcc -g -I/home/solar/rilee/include  -sun4 -c  netcdf.cc
> netcdf.cc: In method `enum NcFile::FillMode NcFile::get_fill()':
> netcdf.cc:210: return-type is an incomplete type
> netcdf.cc:210: conflicting types for `void NcFile::get_fill()'
> netcdf.hh:87: previous declaration as `enum NcFile::FillMode 
> NcFile::get_fill()'
> netcdf.cc: In method `void NcFile::get_fill()':
> netcdf.cc:213: invalid use of undefined type `enum NcFile::FillMode'
> netcdf.cc:216: invalid use of undefined type `enum NcFile::FillMode'
> netcdf.cc:218: invalid use of undefined type `enum NcFile::FillMode'
> *** Error code 1
> make: Fatal error: Command failed for target `netcdf.o'

I'm having problems reproducing this bug.  Things work fine with Sun's C++
compiler under Solaris 2.3 (with the ncbyte typedef in netcdf.h commented
out).  I tried using gcc-2.5.4, the latest gcc we have installed, and it
worked fine for building the C library and programs.  

But when I tried to build the C++ interface with gcc, I got some other
errors that seem to indicate a problem with our gcc installation: error
messages indicate gcc couldn't find system include files such as
"generic.h".  I think this is a problem with our gcc installation, and will
probably have to re-install it from the latest gcc distribution to track
down the problem.  I'll try to get that done soon.

--Russ