This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/17537] New: g++ not passing -lstdc++ to linker when no .o files are specified
- From: "dpatel at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Sep 2004 18:23:11 -0000
- Subject: [Bug driver/17537] New: g++ not passing -lstdc++ to linker when no .o files are specified
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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
--
Summary: g++ not passing -lstdc++ to linker when no .o files are
specified
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: driver
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dpatel at apple dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: powerpc-darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17537