From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12481 invoked by alias); 28 Apr 2006 13:31:35 -0000 Received: (qmail 12471 invoked by uid 22791); 28 Apr 2006 13:31:34 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 28 Apr 2006 13:31:32 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1FZT4C-0000DJ-00; Fri, 28 Apr 2006 15:31:28 +0200 Date: Fri, 28 Apr 2006 13:31:00 -0000 To: "paolo.destro-demo" Cc: ecos-discuss Message-ID: <20060428133128.GC26803@lunn.ch> Mail-Followup-To: "paolo.destro-demo" , ecos-discuss References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060403 From: Andrew Lunn X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Undefined Reference X-SW-Source: 2006-04/txt/msg00241.txt.bz2 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 > 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