This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Programming in C++
- To: ecos-discuss at sources dot redhat dot com
- Subject: [ECOS] Programming in C++
- From: jalfredoc at netscape dot net (Alfredo Carrillo)
- Date: Fri, 04 May 2001 01:09:30 -0400
Hi,
I'm trying to program in C++, but when I compile te code there are some errors (undefined references to 'cout' and 'endl').
Another newbie; thanks in advance for any help.
The code looks as follows:
#include <cyg/kernel/kapi.h>
#include <stdio.h>
#include <iostream.h>
#include "class1.cc"
extern "C" {
void cyg_user_start(void);
void main_thread(cyg_addrword_t);
}
#define NTHREADS 1
#define STACKSIZE 4096
cyg_handle_t thread[NTHREADS];
cyg_thread thread_obj[NTHREADS];
char stack[NTHREADS][STACKSIZE];
void cyg_user_start(void)
{
cyg_thread_create(4, main_thread, (cyg_addrword_t) 0,
"main_th", (void *) stack[0],
STACKSIZE, &thread[0], &thread_obj[0]);
cyg_thread_resume(thread[0]);
}
void main_thread(cyg_addrword_t data)
{
class1 c;
c.prt();
}
--
Alfredo Carrillo
jalfredoc@netscape.net
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/