This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problems building "old" C++ code with g++ 3.2.2


Let me preface this by saying that I am not a C++ programmer.  My build
environment is a Sun SPARC Ultra10 running Solaris 8 with GCC 3.2.2.

I am trying to build a few of the CAIDA tools for monitoring network traffic.
I am starting with their arts++ package, but I'm not getting very far.  The
very first message I get can be resolved by the '-Wno-deprecated' flag, but
the second one (ISO C++ forbids...) seems to start a cascade of errors from
which the compiler cannot recover:

In file included from /usr/local/include/c++/3.2.2/backward/ostream.h:31,
                 from ../include/ArtsHeader.hh:53,
                 from ../include/Arts.hh:49,
                 from Arts.cc:50:
/usr/local/include/c++/3.2.2/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 substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the depreca
ted header <strstream.h>. To disable this warning use -Wno-deprecated.
In file included from ../include/ArtsAttributeVector.hh:48,
                 from ../include/Arts.hh:50,
                 from Arts.cc:50:
../include/ArtsAttribute.hh:294: ISO C++ forbids declaration of `string' with 
   no type
../include/ArtsAttribute.hh:294: parse error before `(' token
../include/ArtsAttribute.hh:368: ISO C++ forbids declaration of `string' with 
   no type
../include/ArtsAttribute.hh:368: declaration of `const int 
   ArtsAttribute::string'
../include/ArtsAttribute.hh:294: conflicts with previous declaration `const int 
   ArtsAttribute::string'
../include/ArtsAttribute.hh:368: parse error before `(' token
../include/ArtsAttribute.hh:376: parse error before `&' token
../include/ArtsAttribute.hh:501: syntax error before `*' token

......

Other than learning C++ and re-writing all of the code to be more compliant with the C++ standard, is there any way I can get the compiler to accept this code for what it is?  I have a Pentium system running the Red Hat 7.3 Linux distribution, which includes GCC 2.96, and that compiler is perfectly happy with the code.  I'd rather not "downgrade" the compiler on the Solaris system, but I wouldn't mind "upgrading" to GCC 3.3, if that will offer me a path to deal with this issue.

So, do I have any reasonable options here?  Any and all help would be greatly appreciated.

					Thanks,
						/Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]