www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/02/21:34:11

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "Chris Barry" <crbarry AT mts DOT net>
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<char>::copy(char *,char const *,unsigned long)'
c:/djgpp/tmp\ccv8kdyh.o(.text+0xd18):dan.cpp: undefined reference to
'string_char_traits<char>::set(char *,char const *,unsigned long)'
c:/djgpp/tmp\ccv8kdyh.o(.text+0xd5f):dan.cpp: undefined reference to
'string_char_traits<char>::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<char>::assign(char *,char const *)'
c:/djgpp/tmp\ccv8kdyh.o(.text+0x15d7):dan.cpp: undefined reference to
'string_char_traits<char>::eos(void)'
collect2: ld returned 1 exit status

This is from a .cpp file that #include's only <string>. 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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019