Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

iostream error.

1 view
Skip to first unread message

Prasad

unread,
May 4, 2006, 1:33:28 AM5/4/06
to
Hi All,

I am executing simple hello world program. But, getting compile time
errors.
What is the problem here?

prasad@D-T11673A:~/programs/c> cat bst.cpp
#include<iostream>

using namespace std;

int main ()
{
cout << "Hello World." ;
return 0 ;
}

prasad@D-T11673A:~/programs/c> gcc bst.cpp
/tmp/ccrmoRpD.o: In function `main':
bst.cpp:(.text+0x25): undefined reference to `std::cout'
bst.cpp:(.text+0x2a): undefined reference to `std::basic_ostream<char,
std::char_traits<char> >& std::operator<< <std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/ccrmoRpD.o: In function `__tcf_0':
bst.cpp:(.text+0x47): undefined reference to
`std::ios_base::Init::~Init()'
/tmp/ccrmoRpD.o: In function
`__static_initialization_and_destruction_0(int, int)':
bst.cpp:(.text+0x74): undefined reference to
`std::ios_base::Init::Init()'
/tmp/ccrmoRpD.o:(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0'
collect2: ld returned 1 exit status

prasad@D-T11673A:~/programs/c> echo $?
1

Thanks & regards,
Prasad

Neroku

unread,
May 4, 2006, 1:40:25 AM5/4/06
to

Prasad ha escrito:

> Hi All,
>
> I am executing simple hello world program. But, getting compile time
> errors.
> What is the problem here?
>
> prasad@D-T11673A:~/programs/c> cat bst.cpp
> #include<iostream>

It should be #include <iostream.h>, that's why your compiler doesn't
find the iostream header.

> using namespace std;
>
> int main ()
> {
> cout << "Hello World." ;
> return 0 ;
> }
>

All this belongs to C++ and not Standard C, bear in mind that we only
discuss the Standard C so this is off-topic here. Asking to
comp.lang.c++ would be more suitable.

Ian Collins

unread,
May 4, 2006, 1:49:41 AM5/4/06
to
Neroku wrote:
> Prasad ha escrito:
>
>
>>Hi All,
>>
>>I am executing simple hello world program. But, getting compile time
>>errors.
>>What is the problem here?
>>
>>prasad@D-T11673A:~/programs/c> cat bst.cpp
>>#include<iostream>
>
>
> It should be #include <iostream.h>, that's why your compiler doesn't
> find the iostream header.
>
No he shouldn't, the correct file is <iostream>

>
>
>
>>using namespace std;
>>
>>int main ()
>>{
>> cout << "Hello World." ;
>> return 0 ;
>>}
>>
>
>
> All this belongs to C++ and not Standard C, bear in mind that we only
> discuss the Standard C so this is off-topic here. Asking to
> comp.lang.c++ would be more suitable.
>
Followups set.

--
Ian Collins.

Prasad

unread,
May 4, 2006, 1:55:07 AM5/4/06
to
Thanks a lot, for your suggestions.

I will discuss the issue with c++ Newsgroup.

Sorry for bothering you.

Thanks again

Martin Ambuhl

unread,
May 4, 2006, 2:48:36 PM5/4/06
to
Prasad wrote:
> Hi All,
>
> I am executing simple hello world program. But, getting compile time
> errors.
> What is the problem here?
>
> prasad@D-T11673A:~/programs/c> cat bst.cpp
> #include<iostream>
> using namespace std;

'What is the problem' is that you are not writing C. The above two
lines are gibberish is C; they appear to be from an arcane bloated
language called "C++", which has its own newsgroup <news:comp.lang.c++>.

Martin Ambuhl

unread,
May 4, 2006, 2:51:43 PM5/4/06
to
Neroku wrote:
> Prasad ha escrito:
>
>
>>Hi All,
>>
>>I am executing simple hello world program. But, getting compile time
>>errors.
>>What is the problem here?
>>
>>prasad@D-T11673A:~/programs/c> cat bst.cpp
>>#include<iostream>
>
>
> It should be #include <iostream.h>, that's why your compiler doesn't
> find the iostream header.

a) There are no headers named <iostream> or <iostream.h> in C. Your
advice is off-topic and
b) your advice is *wrong*. The completely off-topic C++ header is, in
fact, named <iostream>.

You seem capable of understanding either that <news:comp.lang.c> is not
for other languages or that there is an actual standard for that other
language, which your bogus advice contradicts.

Ian Collins

unread,
May 4, 2006, 5:24:47 PM5/4/06
to
Martin Ambuhl wrote:
>
> a) There are no headers named <iostream> or <iostream.h> in C. Your
> advice is off-topic and
> b) your advice is *wrong*. The completely off-topic C++ header is, in
> fact, named <iostream>.
>
> You seem capable of understanding either that <news:comp.lang.c> is not
> for other languages or that there is an actual standard for that other
> language, which your bogus advice contradicts.

This invective is both superfluous and contains the word 'capable' where
you probably wanted 'incapable'. See, I'm not the only one who makes
mistakes.

--
Ian Collins.

Martin Ambuhl

unread,
May 5, 2006, 5:26:51 AM5/5/06
to

You are right that I erred in using 'capable' with the 'either .. or'
constructuction and should have, as you suggest, used 'incapable' or, as
I had intended, used a 'neither .. nor' contstruction. But I was not
passing on bogus, off-topice 'advice'. It is not superfluous for me to
note that your 'advice' was not only off-topic but *wrong*. For God's
sake, if you want to post off-topic answers, at least be close to being
right.

Ian Collins

unread,
May 5, 2006, 5:35:44 AM5/5/06
to

Look agian.

My comments where

"No he shouldn't, the correct file is <iostream>"

and the setting of a follow-up to c.l.c++

So I had already corrected the bogus advice and directed the thread to
the appropriate place.

If you are going to slag someone of on a public forum, get your facts
straight, or you will make an arse of yourself.

--
Ian Collins.

Martin Ambuhl

unread,
May 5, 2006, 11:33:49 AM5/5/06
to
Ian Collins wrote:

> Look agian.
>
> My comments where
>
> "No he shouldn't, the correct file is <iostream>"
>
> and the setting of a follow-up to c.l.c++
>
> So I had already corrected the bogus advice and directed the thread to
> the appropriate place.

That explains it. You are an idiot who does not understand how usenet
works.

> If you are going to slag someone of on a public forum, get your facts
> straight, or you will make an arse of yourself.

Sorry, I had never imagined that you were a complete idiot. That
someone else has in parallel answered a question never calls for
insulting them by calling their posts "superfluous." Only an idiot with
no understanding of newsgroups would think his post made any others that
he saw "superfluous." Please get a clue.

Keith Thompson

unread,
May 5, 2006, 3:09:09 PM5/5/06
to
Martin Ambuhl <mam...@earthlink.net> writes:
> Ian Collins wrote:
>> Look agian.
>> My comments where
>> "No he shouldn't, the correct file is <iostream>"
>> and the setting of a follow-up to c.l.c++
>> So I had already corrected the bogus advice and directed the thread
>> to
>> the appropriate place.
>
> That explains it. You are an idiot who does not understand how usenet
> works.

Martin, you accused Ian Collins of offering bogus advice. In fact, he
*corrected* the bogus advice that someone else had offered, and you
have not acknowledged your own error. Whatever else Ian may have
done, I suggest that there's more than enough blame to go around here.

--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.

David Resnick

unread,
May 5, 2006, 3:21:33 PM5/5/06
to
Keith Thompson wrote:

> Martin Ambuhl <mam...@earthlink.net> writes:
> > That explains it. You are an idiot who does not understand how usenet
> > works.
>
> Martin, you accused Ian Collins of offering bogus advice. In fact, he
> *corrected* the bogus advice that someone else had offered, and you
> have not acknowledged your own error. Whatever else Ian may have
> done, I suggest that there's more than enough blame to go around here.
>

Looks to me like Martin's first reply was to Neroku. Ian thought it
was to him and took offense. Apparently you also thought it was to
Ian? I can't see how, the stuff Martin quoted was from Neroku's post.

-David

Martin Ambuhl

unread,
May 5, 2006, 3:24:30 PM5/5/06
to
Keith Thompson wrote:
> Martin Ambuhl <mam...@earthlink.net> writes:
>
>>Ian Collins wrote:
>>
>>>Look agian.
>>>My comments where
>>>"No he shouldn't, the correct file is <iostream>"
>>>and the setting of a follow-up to c.l.c++
>>>So I had already corrected the bogus advice and directed the thread
>>>to
>>>the appropriate place.
>>
>>That explains it. You are an idiot who does not understand how usenet
>>works.
>
>
> Martin, you accused Ian Collins of offering bogus advice. In fact, he
> *corrected* the bogus advice that someone else had offered, and you
> have not acknowledged your own error. Whatever else Ian may have
> done, I suggest that there's more than enough blame to go around here.

Thank you, Keith. My erro was in supposing that Ian Collins, in calling
my post "superfluous" was somehow involved in the same thread. His
(which he only quoted in this latest message) was a parallel post. It
did not appear as anything to which I responded or as a parent of
anything to which I responded. He gave no reason for asserting that my
response was "superfluous". The text he quoted above appears in no post
to which I responded, or in any parent of such a post. There is no
particular reason for me to acknowledge any error than assuming that he
had any clue about how usenet works. His completely rude and
unwarranted assertion that my post was "superfluous" with no indication
of why shows him to be an ignorant boor. There is no reason for me to
chase down his parallel posting to determine why he decided to belittle
mine.


Keith Thompson

unread,
May 5, 2006, 4:36:34 PM5/5/06
to

In a post that was a direct followup to a post by Ian Collins, you wrote:

| It is not superfluous for me to note that your 'advice' was not only
| off-topic but *wrong*. For God's sake, if you want to post
| off-topic answers, at least be close to being right.

It's reasonable to assume that you were addressing Ian directly,
particularly since the person who actually did offer the bogus advice
was neither mentioned nor quoted in your followup. Usenet posts by
their nature are directed to everyone who reads them, but usually a
second-person pronoun refers to the author of the immediate parent
post, unless someone else is specifically indicated.

If the words "you" and "your" were not intended to refer to Ian,
that's understandable, but it wasn't at all clear from the context.

Ian Collins

unread,
May 5, 2006, 5:46:33 PM5/5/06
to
Keith Thompson wrote:
> Martin Ambuhl <mam...@earthlink.net> writes:
>
>>Ian Collins wrote:
>>
>>>Look agian.
>>>My comments where
>>>"No he shouldn't, the correct file is <iostream>"
>>>and the setting of a follow-up to c.l.c++
>>>So I had already corrected the bogus advice and directed the thread
>>>to
>>>the appropriate place.
>>
>>That explains it. You are an idiot who does not understand how usenet
>>works.
>
>
> Martin, you accused Ian Collins of offering bogus advice. In fact, he
> *corrected* the bogus advice that someone else had offered, and you
> have not acknowledged your own error. Whatever else Ian may have
> done, I suggest that there's more than enough blame to go around here.
>
Thank you Keith.

I probably shouldn't have started this in the first place, I'd just read
an unnecessarily rude response form Martin to another response of mine
on another thread and couldn't resist the obvious error.

I also strongly object to people on Usenet using nouns like 'idiot' for
people they don't know.

--
Ian Collins.

Martin Ambuhl

unread,
May 5, 2006, 5:55:14 PM5/5/06
to
Keith Thompson wrote:

> In a post that was a direct followup to a post by Ian Collins, you wrote:
>
> | It is not superfluous for me to note that your 'advice' was not only
> | off-topic but *wrong*. For God's sake, if you want to post
> | off-topic answers, at least be close to being right.

This is in response to his sticking in a completely unwarranted
statement that my post was "superfluous." Nowhere in the thread leading
to it did Ian ever appear, nor did Ian ever indicate why my post was
"superflyous." There was no reason that someone who posted a parallel
response would be rudely intruding. He didn't even have the decency to
tell me that the reason that my post was "superfluous" was that he had
preempted the field in a parallel post, and he now owned the newsgroup.

>
> It's reasonable to assume that you were addressing Ian directly,

Of course I addressed Ian directly. That I mistook him for someone who
would not claim that a parallel, unreferenced message by him made all
other responses "superfluous" was my error. He obviously is very rude
and he obviously has no clue how newsgroups work. Why the hell are you
in this at all?

CBFalconer

unread,
May 5, 2006, 5:45:02 PM5/5/06
to
Keith Thompson wrote:
> Martin Ambuhl <mam...@earthlink.net> writes:
>
... snip ...

>>
>> That explains it. You are an idiot who does not understand how
>> usenet works.
>
> Martin, you accused Ian Collins of offering bogus advice. In
> fact, he *corrected* the bogus advice that someone else had
> offered, and you have not acknowledged your own error. Whatever
> else Ian may have done, I suggest that there's more than enough
> blame to go around here.

I think Martin may have caught the diplomacy bug from Dan Pop. He
did not catch the associated accuracy bug, which is much less apt
to spread in humans.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>


Mark McIntyre

unread,
May 5, 2006, 7:19:30 PM5/5/06
to
On Sat, 06 May 2006 09:46:33 +1200, in comp.lang.c , Ian Collins
<ian-...@hotmail.com> wrote:

>
>I probably shouldn't have started this in the first place, I'd just read
>an unnecessarily rude response form Martin to another response of mine
>on another thread and couldn't resist the obvious error.

In point of fact, looking at the threading history on google, Martin
wasn't replying to you at all. You and Keith need to get better
newsreaders, and /or not jump too fast. :-)


[FYI here's the sequence with spaces to represent the reply levels]
1 Prasad
2 Neroku posting wrong advice
3 Collins correcting Neroku
3 Ambuhl correcting Neroku
4 Collins flaming Ambuhl by mistake
5 Ambuhl flaming collins in indignation
etc etc etc

>I also strongly object to people on Usenet using nouns like 'idiot' for
>people they don't know.

Sometimes, you don't need to know someone to detect that they're an
idiot.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan

Keith Thompson

unread,
May 5, 2006, 7:55:25 PM5/5/06
to
Mark McIntyre <markmc...@spamcop.net> writes:
> On Sat, 06 May 2006 09:46:33 +1200, in comp.lang.c , Ian Collins
> <ian-...@hotmail.com> wrote:
>>I probably shouldn't have started this in the first place, I'd just read
>>an unnecessarily rude response form Martin to another response of mine
>>on another thread and couldn't resist the obvious error.
>
> In point of fact, looking at the threading history on google, Martin
> wasn't replying to you at all. You and Keith need to get better
> newsreaders, and /or not jump too fast. :-)

Martin did reply directly to Ian, and incorrectly accused him of
posting bogus information. See
<http://groups.google.com/group/comp.lang.c/msg/9efd288957a0055f>.
Possibly he did not intend the word "you" to refer to the poster of
the article to which he was directly replying.

Mark McIntyre

unread,
May 6, 2006, 6:43:14 PM5/6/06
to
On Fri, 05 May 2006 23:55:25 GMT, in comp.lang.c , Keith Thompson
<ks...@mib.org> wrote:

>Mark McIntyre <markmc...@spamcop.net> writes:
>> On Sat, 06 May 2006 09:46:33 +1200, in comp.lang.c , Ian Collins
>> <ian-...@hotmail.com> wrote:
>>>I probably shouldn't have started this in the first place, I'd just read
>>>an unnecessarily rude response form Martin to another response of mine
>>>on another thread and couldn't resist the obvious error.
>>
>> In point of fact, looking at the threading history on google, Martin
>> wasn't replying to you at all. You and Keith need to get better
>> newsreaders, and /or not jump too fast. :-)
>
>Martin did reply directly to Ian, and incorrectly accused him of
>posting bogus information. See
><http://groups.google.com/group/comp.lang.c/msg/9efd288957a0055f>.
>Possibly he did not intend the word "you" to refer to the poster of
>the article to which he was directly replying.

Keith, go back and read the google threading again. You've started too
far down the thread. .

Keith Thompson

unread,
May 6, 2006, 8:07:34 PM5/6/06
to
Mark McIntyre <markmc...@spamcop.net> writes:
> On Fri, 05 May 2006 23:55:25 GMT, in comp.lang.c , Keith Thompson
> <ks...@mib.org> wrote:
>
>>Mark McIntyre <markmc...@spamcop.net> writes:
>>> On Sat, 06 May 2006 09:46:33 +1200, in comp.lang.c , Ian Collins
>>> <ian-...@hotmail.com> wrote:
>>>>I probably shouldn't have started this in the first place, I'd just read
>>>>an unnecessarily rude response form Martin to another response of mine
>>>>on another thread and couldn't resist the obvious error.
>>>
>>> In point of fact, looking at the threading history on google, Martin
>>> wasn't replying to you at all. You and Keith need to get better
>>> newsreaders, and /or not jump too fast. :-)
>>
>>Martin did reply directly to Ian, and incorrectly accused him of
>>posting bogus information. See
>><http://groups.google.com/group/comp.lang.c/msg/9efd288957a0055f>.
>>Possibly he did not intend the word "you" to refer to the poster of
>>the article to which he was directly replying.
>
> Keith, go back and read the google threading again. You've started too
> far down the thread. .

I was referring to the article that I cited. Whatever happened
earlier in the thread may or may not be of some significance; I just
didn't happen to be talking about it. I stand by my earlier
statements.

Mark McIntyre

unread,
May 8, 2006, 5:25:06 PM5/8/06
to
On Sun, 07 May 2006 00:07:34 GMT, in comp.lang.c , Keith Thompson
<ks...@mib.org> wrote:

>I was referring to the article that I cited. Whatever happened
>earlier in the thread may or may not be of some significance; I just
>didn't happen to be talking about it. I stand by my earlier
>statements.

*shrug*.
As usual, I'm amazed at how normal intelligent people will defend
their mistakes beyond the point of it being sensible.

Rod Pemberton

unread,
May 8, 2006, 9:23:36 PM5/8/06
to

"Mark McIntyre" <markmc...@spamcop.net> wrote in message
news:0odv5295b4pk583o7...@4ax.com...

> On Sun, 07 May 2006 00:07:34 GMT, in comp.lang.c , Keith Thompson
> <ks...@mib.org> wrote:
>
> >I was referring to the article that I cited. Whatever happened
> >earlier in the thread may or may not be of some significance; I just
> >didn't happen to be talking about it. I stand by my earlier
> >statements.
>
> *shrug*.
> As usual, I'm amazed at how normal intelligent people will defend
> their mistakes beyond the point of it being sensible.

I think that's _almost_ a correct statement. I would've said:
"As usual, I'm amazed at how intelligent people will defend their mistakes


beyond the point of it being sensible. "


Rod Pemberton


Keith Thompson

unread,
May 9, 2006, 7:59:27 PM5/9/06
to
Mark McIntyre <markmc...@spamcop.net> writes:
> On Sun, 07 May 2006 00:07:34 GMT, in comp.lang.c , Keith Thompson
> <ks...@mib.org> wrote:
>>I was referring to the article that I cited. Whatever happened
>>earlier in the thread may or may not be of some significance; I just
>>didn't happen to be talking about it. I stand by my earlier
>>statements.
>
> *shrug*.
> As usual, I'm amazed at how normal intelligent people will defend
> their mistakes beyond the point of it being sensible.

Since the above was a direct response to something I posted, it gives
the appearance of being a comment directed specifically at me. In
private e-mail, Mark has indicated that it was actually directed at me
and several others. I mention this for the sake of setting the record
straight.

I still stand by my earlier statements, but I'm not particularly
interested in discussing this on the newsgroup any further.

0 new messages