17537 – [3.4 Regression] g++ not passing -lstdc++ to linker when -l is only supplied (original) (raw)
Description Devang Patel 2004-09-17 18:23:11 UTC
Steps to reproduce. $ cat > main.cpp int main() { char *foo = new char[10]; delete foo; }
$ g++ -c main.cpp
$ g++ -o main1 main.o
$ ar cr libmain.a main.o
$ ranlib libmain.a
$ g++ -o main2 libmain.a
$ g++ -o main3 -L. -lmain
ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
operator delete(void*)
operator new[](unsigned long)
___gxx_personality_v0
Comment 1 Drea Pinski 2004-09-17 18:38:12 UTC
Confirmed, correcting the summary as it is only true for -l. Also this is a regression from 3.3.3.
Comment 3 Paolo Carlini 2004-09-27 15:44:48 UTC
*** Bug 17694 has been marked as a duplicate of this bug. ***
Comment 5 Drea Pinski 2004-09-28 22:53:21 UTC
Now only a 3.4 regression.
Comment 7 Drea Pinski 2004-09-29 02:34:46 UTC
Fixed.