GCC >= 3 problems

Steve Marotta Stephen.J.Marotta@lmco.com
Wed Jan 23 07:31:00 GMT 2002


I've been working with GCC for several years now, and have been 
generally very pleased with the compilers.  Recently I tried installing 
GCC v3.0.3, and upon successful installation, I tried compiling a piece 
of code under a library that I knew to be working under GCC 2.95.3.  It 
began flooding me with error messages saying that functions in the 
library files did not work.  Here are a few of the errors...

c++ -I/usr/local/include -I/usr/include/mysql -g -O2 -c sample.cxx
In file included from /usr/local/include/coldata1.hh:7,
                 from /usr/local/include/sqlplus.hh:12,
                 from sample.cxx:3:
/usr/local/include/exceptions.hh:65: parse error before `er'
/usr/local/include/exceptions.hh:65: missing ';' before right brace
/usr/local/include/exceptions.hh:66: ISO C++ forbids defining types within
   return type
/usr/local/include/exceptions.hh:66: syntax error before `;' token

Incidentally, the lines in questions are as follows...

struct BadQuery {
  BadQuery(string er) : error(er) {}
  string error; //: The error message
};


As I said before, this program compiled without a problem in GCC 2.95.3. 
 Also, this is not the only code that failed to compile with the new 
version.  It strikes me as a bit troublesome that upgrading my compiler 
will result in causing most source code I use to be unusable.  Have 
others run into this problem, and if so, what do you recommend?

I'm also running into another problem when it comes to compiling C code 
using the Mesa 3D libraries.  Here is the error I receive:

/usr/lib/libglut.so: undefined reference to `atexit'
collect2: ld returned 1 exit status
make: *** [maze] Error 1

It's very important that I get this working as soon as possible, and any 
information you can give me would be very appreciated.  Thanks in advance.

/* Steve */
May the Source be with you...



More information about the Gcc mailing list