Mail Archives: djgpp/2003/08/11/16:40:44
------=_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> </DIV> <DIV> </DIV> <DIV>Thanks for rep=
lying. This is what I entered in DOS:</DIV> <DIV> </DIV> <DIV>chdir =
C:\My Programs<BR>gcc ideclare.o -o ideclare.exe</DIV> <DIV> </DIV> =
<DIV><BR>And here's the errors:</DIV> <DIV> </DIV> <DIV>ideclare.o&l=
t;.text+0x2b>: In function 'main':<BR>c:/DJGPP/bin/ideclare.cpp:16: un=
defined reference <BR>to 'std::cout' <BR>ideclare.o<.text+0x30>:c:/=
DJGPP/bin/ideclare.cpp:16: <BR>undefined reference to 'std::basic_ostream=
<char, <BR>std::char_traits<char> >::operator<<<int&=
gt;'<BR>ideclare.o(.text+0x39):c:/DJGPP/bin/ideclare.cpp:16: <BR>undefine=
d reference to `std::basic_ostream<char, <BR>std::char_traits<char&=
gt; >& std::operator<< <std::char_trait<BR>s<char> =
>(std::basic_ostream<char, <BR>std::char_traits<char> >&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> </DIV> <DIV> </DIV> <DIV>I hope the l=
ine length is better now.</DIV> <DIV> </DIV> <DIV>David Kobilny=
k</DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </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> </DIV>David Kobilnyk <DavidKobilnyk AT msn DOT com> wrote:<=
BR><BR>> I'm having trouble getting "cout" to work. The compiler tells=
me<BR>> there are no errors with my code; but when I try to turn the =
object<BR>> file into an executable file using DOS, I get a bunch of e=
rror<BR>> 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. =
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? 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 -