X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Chris Barry" Newsgroups: comp.os.msdos.djgpp Subject: iostream errors with the STL Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Message-ID: <0bPY7.7685$qN3.72172@news1.mts.net> Date: Wed, 2 Jan 2002 20:14:32 -0800 NNTP-Posting-Host: 205.200.59.194 X-Complaints-To: admin AT mts DOT net X-Trace: news1.mts.net 1010024252 205.200.59.194 (Wed, 02 Jan 2002 20:17:32 CST) NNTP-Posting-Date: Wed, 02 Jan 2002 20:17:32 CST Organization: MTS Internet To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hullo. Awhile ago I wrote a tutorial on the STL. Since then I've encountered tthe odd soul who can't compile my examples for either DJGPP or MinGW, and it's pissing me off as much as it does them. Here's a taste of the error messages: c:/djgpp/tmp\ccv8kdyh.o(.text+0x5ba):dan.cpp: undefined reference to 'endl(ostream &)' c:/djgpp/tmp\ccv8kdyh.o(.text+0x5c7):dan.cpp: undefined reference to 'cerr' c:/djgpp/tmp\ccv8kdyh.o(.text+0x5cc):dan.cpp: undefined reference to 'ostream: :operator<<(char const *)' c:/djgpp/tmp\ccv8kdyh.o(.text+0x5d7):dan.cpp: undefined reference to 'ostream: :operator<<(ostream &(*)(ostream &))' c:/djgpp/tmp\ccv8kdyh.o(.text+0xa8f):dan.cpp: undefined reference to 'string_char_traits::copy(char *,char const *,unsigned long)' c:/djgpp/tmp\ccv8kdyh.o(.text+0xd18):dan.cpp: undefined reference to 'string_char_traits::set(char *,char const *,unsigned long)' c:/djgpp/tmp\ccv8kdyh.o(.text+0xd5f):dan.cpp: undefined reference to 'string_char_traits::move(char *,char const *,unsigned long)' c:/djgpp/tmp\ccv8kdyh.o(.text+0xda4):dan.cpp: undefined reference to '__out_of_range(char const *)' c:/djgpp/tmp\ccv8kdyh.o(.text+0xdfe):dan.cpp: undefined reference to '__length_error(char const *)' c:/djgpp/tmp\ccv8kdyh.o(.text+0x14ae):dan.cpp: undefined reference to 'string_char_traits::assign(char *,char const *)' c:/djgpp/tmp\ccv8kdyh.o(.text+0x15d7):dan.cpp: undefined reference to 'string_char_traits::eos(void)' collect2: ld returned 1 exit status This is from a .cpp file that #include's only . I asked about it on comp.lang.c++ and discovered that since using namespace std isn't required, then we're talking a non-standard library, and I should ask you guys. What's the problem? Need more info? -- Chris Barry