This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/17537] New: g++ not passing -lstdc++ to linker when no .o files are specified


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]