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

Re: Netcdf on red hat Linux



Hi Xuguang,

> I am a first year graduate student.  I am trying to install netCDF library
> on red hat Linux using Portland Group's pgf90 compiler.  I followed the
> insruction you recommended:

 ...

>  But when the command 'make all' was invoked, I got the error message as
> below:
> 
> **************************************************************************
> Making `all' in directory /tmp/netcdf-3.4/src/cxx
> 
> make[2]: Entering directory `/tmp/netcdf-3.4/src/cxx'
> /usr/bin/g++ -c -g  -I../libsrc  -DpgiFortran netcdf.cc
> In file included from netcdf.hh:16,
>                  from netcdf.cc:12:
> ncvalues.hh:13: iostream.h: No such file or directory
> ncvalues.hh:17: strstream.h: No such file or directory

Sorry it took me so long to get to this, but you need to send
questions like this to "address@hidden" rather than specific
addresses of programmers, so it will be assigned to someone who is not
away on vacation or at a meeting.  Another way to get quick answers to
questions like this is to use the support email search facility at the
bottom of the netCDF home page at

  http://www.unidata.ucar.edu/packages/netcdf/

By searching for "iostream.h", I quickly found several ways to get
around this problem.  The problem is that the Portland C++ compiler
recognizes the new C++ standard form of include:

 #include <iostream>
 #include <strstream>

but doesn't recognize the older form used in our C++ interface:

 #include <iostream.h>  
 #include <strstream.h>

and we can't change our C++ code to the newer version until all C++
compilers support it.  So there are several things you can do:

 1.  Change the #include statements in the netCDF source files
     cxx/{nctst.cc,ncvalues.cc,ncvalues.hh} to the first form above; or

 2.  Find some sort of argument or macro for the Portland C++ compiler
     that instructs it to accept the older form of #include; or

 3.  Specify that you don't need the C++ interface by setting the
     environment variable CXX to "" before trying to build the netCDF
     library.

Please let me know if this doesn't work ...

--Russ