public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "paolo.destro-demo" <paolo.destro-demo@poste.it>
Cc: ecos-discuss <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] Undefined Reference
Date: Fri, 28 Apr 2006 13:31:00 -0000	[thread overview]
Message-ID: <20060428133128.GC26803@lunn.ch> (raw)
In-Reply-To: <IYFP9E$AE4481984B0DEBE27DFAF065645B4795@poste.it>

On Fri, Apr 28, 2006 at 03:24:50PM +0200, paolo.destro-demo wrote:
> Hi, I'm trying to compile this program
> 
> //file name: librerie.cc
> #include <iostream>
> using namespace std;
> int main(){
> 	cout << "Hello World" << endl;
> };
> 
> using g++ version 296, but it doesn't work!
> The compiler give me this error message
> 
> /usr/include/g++-3/iostream.h:106: undefined reference to `cout'
> librerie.o(.text.main+0x11):/usr/include/g++-3/iostream.h:106:
> undefined reference to `ostream::operator<<(char const *)'
> librerie.o(.text.main+0x19):/usr/include/g++-3/iostream.h:106:
> undefined reference to `endl(ostream &)'
> collect2: ld returned 1 exit status
> 
> If I use "stdio.h" and "printf" instead of "iostream" and
> "cout", the program work.
> 
> How can I use the class iostream in my programs for eCos?

anoncvs version of eCos does not support iostreams etc.

If you want a full C++ environment you need to talk to eCosCentric
about purchasing there version of eCos, or look back in the archives
where people have managed some quick and dirty ports of the standard
C++ libraries.

    Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

      reply	other threads:[~2006-04-28 13:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-28 13:24 paolo.destro-demo
2006-04-28 13:31 ` Andrew Lunn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060428133128.GC26803@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=paolo.destro-demo@poste.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).