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

Re: 20010820: Problem linking to libnetcdf_c++ on prospect/tru64



>To: netCDF Support <address@hidden>
>cc: Mary Haley <address@hidden>
>From: Charlie Zender <address@hidden>
>Subject: Problem linking to libnetcdf_c++ on prospect/tru64
>Organization: UC Irvine
>Keywords: 200108202046.f7KKkA106661 netCDF C++

Hi Charlie,

> I would like to know if you were able to verify whether there is a 
> problem with unscoped ostream (should be std::ostream) in the
> netcdf library that is causing my problem compiling on
> prospect.ucar.edu, or whether you think the problem is with my client
> side code. I sent the report in about two weeks ago but can
> resend if necessary. 

First, sorry it's taken so long to reply.  I still have your original
message, but it was in a big batch of support messages to handle after
vacation and it didn't get the attention it deserved.  I think the fix
is as simple as changing
 #include <iostream.h>
to
 #include <iostream>
which will automatically use the "std" namespace, but this needs to be
verified.

I'm still trying to figure out how to make the C++ interface work in
netcdf 3.5.1 on the wide range of C++ compilers that are out there.
With g++ 3.0 out, we have to update some of the code to adhere
strictly to the standards, but we have to be careful not to break
support on old C++ compilers that don't support namespaces, for
example.  I had been relying on the "C++ Portability Guide", at

  http://www.mozilla.org/hacking/portable-cpp.html

which recommends not using the namespace facility, for example, but
that may be outdated advice at this point.

I have requested a login on prospect.ucar.edu, so I'll be fixing the
C++ interface in 3.5.1 to compile there and then seeing what that
breaks on other platforms.  (We have our own alpha running OSF 5.1, but
apparently ksh is broken on it, which has prevented me from logging in
until I could figure out the problem ...).

Thanks for reporting the problem originally and also for being
persistent about it ...

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu