This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Undefined Reference
- From: "paolo\.destro-demo" <paolo dot destro-demo at poste dot it>
- To: "ecos-discuss" <ecos-discuss at ecos dot sourceware dot org>
- Date: Fri, 28 Apr 2006 15:24:50 +0200
- Subject: [ECOS] Undefined Reference
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?
Thanks in advance
Paolo
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss