From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29415 invoked by alias); 23 Dec 2002 17:32:46 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 29407 invoked from network); 23 Dec 2002 17:32:44 -0000 Received: from unknown (HELO h00609772adf0.ne.client2.attbi.com) (24.61.43.152) by 209.249.29.67 with SMTP; 23 Dec 2002 17:32:44 -0000 Received: from h00609772adf0.ne.client2.attbi.com (localhost [127.0.0.1]) by h00609772adf0.ne.client2.attbi.com (8.12.6/8.12.6) with ESMTP id gBNHW9a7007540; Mon, 23 Dec 2002 12:32:09 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost) by h00609772adf0.ne.client2.attbi.com (8.12.6/8.12.6/Submit) id gBNHW80m007539; Mon, 23 Dec 2002 12:32:08 -0500 (EST) Date: Mon, 23 Dec 2002 10:11:00 -0000 From: Craig Rodrigues To: Jack Howarth Cc: gcc@gcc.gnu.org Subject: Re: 3.2.2 c++ compile problems Message-ID: <20021223123204.A7499@attbi.com> References: <200212231718.MAA29417@bromo.msbb.uc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200212231718.MAA29417@bromo.msbb.uc.edu>; from howarth@bromo.msbb.uc.edu on Mon, Dec 23, 2002 at 12:18:18PM -0500 X-SW-Source: 2002-12/txt/msg01349.txt.bz2 On Mon, Dec 23, 2002 at 12:18:18PM -0500, Jack Howarth wrote: > Hello, > Can anyone shed some light on which abi change in the g++ 3.2.x > compiler is causing the following compile error. I am trying to build > the sparky package from... > > > http://www.cgl.ucsf.edu/home/sparky/ > > and I get the following compile time errors under gcc 3.2.2... > > g++ -O2 -fPIC -fpermissive -c brukerfile.cc > In file included from /usr/include/c++/3.2.1/backward/fstream.h:31, > from brukerfile.cc:33: > /usr/include/c++/3.2.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substit > brukerfile.cc: In constructor `Bruker_Params::Bruker_Params(const Stringy&)': > brukerfile.cc:223: could not convert `bp' to `istream&' > brukerfile.cc:101: in passing argument 1 of `bool > read_parameter_entry(istream&, Stringy*, Stringy*)' > make[1]: *** [brukerfile.o] Error 1 > make[1]: Leaving directory `/usr/local/src/sparky/c++' > make: *** [all] Error 2 The sparky source code seems to have several forward declarations which are wrong. For example, in stringc.h: 3 #ifndef STRING_HEADER_INCLUDED 4 #define STRING_HEADER_INCLUDED 5 6 #include 7 8 #undef NULL // Fix bad define in stddef.h gnu distribution. 9 #define NULL 0L 10 11 class istream; 12 class ostream; You need to replace lines 11 and lines 12 with: #include using namespace std; The reason for this is that istream and ostream are not classes in Standard C++. They are typedefs for templates. Look in to see what I am referring to. You need to make this change in: format.h nmrdata.h rectangle.h savefile.h stringc.h -- Craig Rodrigues http://www.gis.net/~craigr rodrigc@attbi.com