Mail Archives: djgpp/2002/03/22/20:15:13
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f
|
From: | "OVERHEAT" <xxx AT yyy DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: can't include iostream.h! <<< similar problem
|
Date: | Sat, 23 Mar 2002 01:33:05 +0100
|
Organization: | T-Online
|
Lines: | 68
|
Message-ID: | <a7gig6$rq3$07$1@news.t-online.com>
|
References: | <MENKPINLJKMHMBAA AT mailcity DOT com>
|
Mime-Version: | 1.0
|
X-Trace: | news.t-online.com 1016843591 07 28483 Mro0Tb9GSjH1Qq 020323 00:33:11
|
X-Complaints-To: | abuse AT t-online DOT com
|
X-Sender: | 0622493140-0001 AT t-dialin DOT net
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 6.00.2600.0000
|
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Hello folks...
I am completly new to c++ programming, and i decided to start out with djgpp
and some basic tutorials...
So I downloaded the most recent distribution of DJGPP from the official
homepage using Zip-Picker.
after installation in solving the first compilation problems i had to face
the same problem as discussed here.
When trying to link the following program
#inlcude <iostream.h>
int main (void) {
cout << "Hello World";
return 0;
}
the linker returns the following messages
Creating: aout.exe
Error: test.o: In function 'main':
test.cpp(3) Error: undefined reference to 'cout'
Error: test.cpp(.text+0x27): undefined reference to
'ostream::operator<<(char const*)'
Error: test.o(.eh_frame+0x11):test.cpp: undefined reference to
'___gxx_personality_v0'
Error: collect2: ld returned 1 exit status
There were some errors
The prior compilation process works fine...
After having read this news thread I thought I could fix that by moving that
mentioned file libstcxx.a somewhere else...
So I searched for it.. and oops... it isnt there...
mhhm... now I am quite sure that i d/l ed all files suggested by zip-picker,
and I have them all installed...
When trying to compile a prog that does not employ iostream.h everything
works flawlessly...
I think I could solve that myself´, but I am simply not skilled enough in
c++. So I have to ask the experts in this NG.
What the hecks going on there...? I suppose it is a file missing... where
can I obtain this file?... Of course I could be wrong...
Hope you dont feel bothered by such simple newbie questions...
thanks in advance
manuel
p.s.: some additional information: OS: win xp, using rhide, environment
variables correctly set, the programm has been saved to test.cpp
"Jason R Kuntz" <cantela AT lycos DOT com> schrieb im Newsbeitrag
news:MENKPINLJKMHMBAA AT mailcity DOT com...
>
> --
> Thank you, Anton! I thought it was obvious from the beginning that
> the problem was linkage, but didn't know how to fix it. Anyway, you
> were right, there was an extra (and outdated) libstdcxx.a, and when i
> moved it, i could suddenly use iostream! I can't tell you how much
> easier this will make programming (printf was getting old ;)!
>
> Thanks again!
> Jason
>
>
>
> 2,000,000,000 Web Pages--you only need 1. Save time with My Lycos.
> http://my.lycos.com
- Raw text -