From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Scherrey To: gcc@gcc.gnu.org Subject: What's bringing these symbols in??? Date: Sun, 16 Sep 2001 19:34:00 -0000 Message-id: <01091622320900.00690@incognito.innoverse.com> X-SW-Source: 2001-09/msg00648.html When doing: gcc -Wl,-Bstatic -o wipedrive Display.o Eraser.o FileDevice.o Progress.o Selection.o /usr/lib/libncurses.a /usr/local/lib/libcdk.a I get these linker errors: Eraser.o: In function '__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned int)': Eraser.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned int)+0x22): undefined reference to 'cerr' Eraser.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned int)+0x22): undefined reference to 'ostream::operator<<(char const *)' Eraser.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned int)+0x22): undefined reference to 'endl(ostream &)' I'm writing a utility that will exist in very limited disk space (a boot floppy) and cannot afford to link in libstdc++. No where do I use iostreams in my application. I do use new & delete as well as a vector. What is causing the reference to these symbols? How can I kill these linker requirements? Is there any way I can force the linkage with the symbols missing? My program will never get to these symbols unless it crashes so frankly I don't care if they're faked. This is driving me nuts! My program is 700K when i include libstdc++ which is completely insane. It needs to be under 400K. I'm running under gcc-2.95.2.1 with Intel Linux 2.2.19. thanx & later, Ben Scherrey