delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/08/11/16:40:44

X-Originating-IP: [206.216.151.220]
X-Originating-Email: [davidkobilnyk AT msn DOT com]
From: "David Kobilnyk" <DavidKobilnyk AT msn DOT com>
To: <djgpp AT delorie DOT com>
Subject: Re: cout command
Date: Mon, 11 Aug 2003 14:57:48 -0500
MIME-Version: 1.0
X-Mailer: MSN Explorer 7.02.0011.2700
Message-ID: <BAY5-DAV88kmCJiLyNf000183c4@hotmail.com>
X-OriginalArrivalTime: 11 Aug 2003 19:57:03.0049 (UTC) FILETIME=[BBBF4B90:01C36042]
Reply-To: djgpp AT delorie DOT com

------=_NextPart_001_0000_01C36018.EDF8E820
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Hans-Bernhard Broeker,


Thanks for replying. This is what I entered in DOS:

chdir C:\My Programs
gcc ideclare.o -o ideclare.exe


And here's the errors:

ideclare.o<.text+0x2b>: In function 'main':
c:/DJGPP/bin/ideclare.cpp:16: undefined reference =20
to 'std::cout' =20
ideclare.o<.text+0x30>:c:/DJGPP/bin/ideclare.cpp:16: =20
undefined reference to 'std::basic_ostream<char, =20
std::char_traits<char> >::operator<<<int>'
ideclare.o(.text+0x39):c:/DJGPP/bin/ideclare.cpp:16: =20
undefined reference to `std::basic_ostream<char, =20
std::char_traits<char> >& std::operator<< <std::char_trait
s<char> >(std::basic_ostream<char, =20
std::char_traits<char> >&, char)'
ideclare.o(.text+0xe6): In function =20
`__static_initialization_and_destruction_0':
c:/djgpp/lang/cxx/3.23/iostream:63: undefined reference to =20
`std::ios_base::Init::Init[in-charge]()'
ideclare.o(.text+0x105):c:/djgpp/lang/cxx/3.23/iostream:63: =20
undefined reference to `std::ios_base::Init::~Init =20
[in-charge]()'
ideclare.o(.eh_frame+0x11): In function `main':
c:/DJGPP/bin/ideclare.cpp:12: undefined reference =20
to `___gxx_personality_v0'
collect2: ld returned 1 exit status


I hope the line length is better now.

David Kobilnyk



----- Original Message -----
From: Hans-Bernhard Broeker
Sent: Monday, August 11, 2003 1:28 PM
To: djgpp AT delorie DOT com
Subject: Re: cout command

David Kobilnyk <DavidKobilnyk AT msn DOT com> wrote:

> I'm having trouble getting "cout" to work. The compiler tells me
> there are no errors with my code; but when I try to turn the object
> file into an executable file using DOS, I get a bunch of error
> messages.

Unfortunately your description is missing the single most important
piece of information needed to help you: *how*, exactly, you did "try to
turn the object file into an executable".

The exact command line, and the exact error message, please.  And make
sure you re-read the "README.1st" file before you try again.

[And can you please reduce your line length?  The whole quoted
paragraph above arrived here as a single line of text, which is a bad
habit.]
-- =20
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.Get more from the Web=
.  FREE MSN Explorer download : http://explorer.msn.com

------=_NextPart_001_0000_01C36018.EDF8E820
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<HTML><BODY STYLE=3D"font:10pt verdana; border:none;"><DIV>Hi Hans-Bernha=
rd Broeker,</DIV> <DIV>&nbsp;</DIV> <DIV>&nbsp;</DIV> <DIV>Thanks for rep=
lying. This is what I entered in DOS:</DIV> <DIV>&nbsp;</DIV> <DIV>chdir =
C:\My Programs<BR>gcc ideclare.o -o ideclare.exe</DIV> <DIV>&nbsp;</DIV> =
<DIV><BR>And here's the errors:</DIV> <DIV>&nbsp;</DIV> <DIV>ideclare.o&l=
t;.text+0x2b&gt;: In function 'main':<BR>c:/DJGPP/bin/ideclare.cpp:16: un=
defined reference <BR>to 'std::cout' <BR>ideclare.o&lt;.text+0x30&gt;:c:/=
DJGPP/bin/ideclare.cpp:16: <BR>undefined reference to 'std::basic_ostream=
&lt;char, <BR>std::char_traits&lt;char&gt; &gt;::operator&lt;&lt;&lt;int&=
gt;'<BR>ideclare.o(.text+0x39):c:/DJGPP/bin/ideclare.cpp:16: <BR>undefine=
d reference to `std::basic_ostream&lt;char, <BR>std::char_traits&lt;char&=
gt; &gt;&amp; std::operator&lt;&lt; &lt;std::char_trait<BR>s&lt;char&gt; =
&gt;(std::basic_ostream&lt;char, <BR>std::char_traits&lt;char&gt; &gt;&am=
p;, char)'<BR>ideclare.o(.text+0xe6): In function <BR>`__static_initializ=
ation_and_destruction_0':</DIV> <DIV>c:/djgpp/lang/cxx/3.23/iostream:63: =
undefined reference to <BR>`std::ios_base::Init::Init[in-charge]()'<BR>id=
eclare.o(.text+0x105):c:/djgpp/lang/cxx/3.23/iostream:63: <BR>undefined r=
eference to `std::ios_base::Init::~Init <BR>[in-charge]()'<BR>ideclare.o(=
.eh_frame+0x11): In function `main':<BR>c:/DJGPP/bin/ideclare.cpp:12: und=
efined reference <BR>to `___gxx_personality_v0'<BR>collect2: ld returned =
1 exit status</DIV> <DIV>&nbsp;</DIV> <DIV>&nbsp;</DIV> <DIV>I hope the l=
ine length is better&nbsp;now.</DIV> <DIV>&nbsp;</DIV> <DIV>David Kobilny=
k</DIV> <DIV>&nbsp;</DIV> <DIV>&nbsp;</DIV> <DIV>&nbsp;</DIV> <BLOCKQUOTE=
 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER=
-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt Ar=
ial">----- Original Message -----</DIV> <DIV style=3D"BACKGROUND: #e4e4e4=
; FONT: 10pt Arial; COLOR: black"><B>From:</B> Hans-Bernhard Broeker</DIV=
> <DIV style=3D"FONT: 10pt Arial"><B>Sent:</B> Monday, August 11, 2003 1:=
28 PM</DIV> <DIV style=3D"FONT: 10pt Arial"><B>To:</B> djgpp AT delorie DOT com<=
/DIV> <DIV style=3D"FONT: 10pt Arial"><B>Subject:</B> Re: cout command</D=
IV> <DIV>&nbsp;</DIV>David Kobilnyk &lt;DavidKobilnyk AT msn DOT com&gt; wrote:<=
BR><BR>&gt; I'm having trouble getting "cout" to work. The compiler tells=
 me<BR>&gt; there are no errors with my code; but when I try to turn the =
object<BR>&gt; file into an executable file using DOS, I get a bunch of e=
rror<BR>&gt; messages.<BR><BR>Unfortunately your description is missing t=
he single most important<BR>piece of information needed to help you: *how=
*, exactly, you did "try to<BR>turn the object file into an executable".<=
BR><BR>The exact command line, and the exact error message, please.&nbsp;=
 And make<BR>sure you re-read the "README.1st" file before you try again.=
<BR><BR>[And can you please reduce your line length?&nbsp; The whole quot=
ed<BR>paragraph above arrived here as a single line of text, which is a b=
ad<BR>habit.]<BR>-- <BR>Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen=
.de)<BR>Even if all the snow were burnt, ashes would remain.<BR></BLOCKQU=
OTE></BODY></HTML><br clear=3Dall><hr>Get more from the Web.  FREE MSN Ex=
plorer download : <a href=3D'http://explorer.msn.com'>http://explorer.msn=
.com</a><br></p>

------=_NextPart_001_0000_01C36018.EDF8E820--

- Raw text -


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