From: Patrick Griffiths Newsgroups: comp.os.msdos.djgpp Subject: Help: simple(?) linker problem Date: Fri, 06 Mar 1998 13:59:26 -0500 Organization: McGill University Computing Centre Lines: 25 Message-ID: <3500478E.527A1D36@po-box.mcgill.ca> NNTP-Posting-Host: b52-23.das.mcgill.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk with the new gcc 2.8.0 when I try to compile this: #include int main() { cout << "Hello, world! \n"; return 0; } with the command line gcc -Wall -o hello hello.cc I get this linker error: d:/djgpp/tmp/ccaaaaaa1.o(.text+0x19):hello.cc: undefined reference to `cout' d:/djgpp/tmp/ccaaaaaa1.o(.text+0x1e):hello.cc: undefined reference to `ostream::operator<<(char const *)' it works if I append -lstdcxx to the command line, but the executable is 386,376 bytes! First, what have I screwed up so that the linker can't find the appropriate library on it's own and second why is the executable so huge?