On Tue, Nov 20, 2001 at 12:19:47PM -0500, Christopher C. Chimelis wrote: > 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"). Fair enough; it's just that "old" gcc never seemed to require that. Presumably I was incorrect in relying on that behaviour. Example; jason@cds020:~$ cat quicktest.cpp int main(void) { int *x = new int; delete x; } jason@cds020:~$ gcc -v Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs gcc version 2.95.4 20011006 (Debian prerelease) jason@cds020:~$ gcc quicktest.cpp jason@cds020:~$ gcc-3.0 -v Reading specs from /usr/lib/gcc-lib/i386-linux/3.0.2/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux Thread model: posix gcc version 3.0.2 20010922 (Debian prerelease) jason@cds020:~$ gcc-3.0 quicktest.cpp /tmp/ccuwc0J9.o: In function `main': /tmp/ccuwc0J9.o(.text+0xf): undefined reference to `operator new(unsigned)' /tmp/ccuwc0J9.o(.text+0x20): undefined reference to `operator delete(void*)' /tmp/ccuwc0J9.o: In function `__FRAME_BEGIN__': /tmp/ccuwc0J9.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status jason@cds020:~$ Cheers. -- "No sense in making things worse by telling the truth" jason@khendon.org.uk
Attachment:
pgp8B4PWYIq42.pgp
Description: PGP signature