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

Re: gcc-3.0 and C++



On Tue, 20 Nov 2001, Jason Williams wrote:

> 'lo, sorry to bother you.
> 
> gcc 2.x compiles C++ source files fine, but gcc-3.0 doesn't. (g++-3.0 seems
> to work okay). Is this a deliberate change?
> 
> (trying to compile C++ with gcc-3.0 fails with undefined references to
> new and delete)

I haven't had any problems with gcc-3.0 compiling or linking executables
(including C++).  If you're using gcc-3.0 to compile C++ sources, then
you'll need to pass it at least -lstc++ at link time (and possibly quite
a few other flags that g++-3.0 automatically passes to the "subtools").

If you want to see what g++-3.0 is doing special, add '-v' to your compile
line and it should dump out everything that it's doing behind the scenes
with the various "parts" of gcc (preprocessor, etc).

I'd have to see your invocation of gcc-3.0 and possibly a testcase to be
sure of what's going on with your attempts.

C




Reply to: