[ECOS] RE: pthreads

Davies, Greg Greg.Davies@Ultra-UEMS.com
Mon Apr 21 11:25:00 GMT 2008


> -----Original Message-----
> From: germantf@ku.edu [mailto:germantf@ku.edu] 
> Hi,
> i noticed that you used pthread with ecos, im starting to use 
> eCos so i dont really know much (im just working in a samall 
> project)..
> but how do you compile with pthreads? when i try to compile 
> using the regular compile leine for ecos i get this errors:
> 
> gcc -c -g -o hello.o 
> -I/home/protito/workspace/eCos/twosynthe_install/include hello.c
> hello.c: In function `main':
> hello.c:29: error: `pthread_t' undeclared (first use in this function)
> hello.c:29: error: (Each undeclared identifier is reported only once
> hello.c:29: error: for each function it appears in.)
> hello.c:29: error: syntax error before "thread"
> hello.c:30: error: `pthread_attr_t' undeclared (first use in 
> this function)
> hello.c:35: error: `attr' undeclared (first use in this function)
> hello.c:36: error: `PTHREAD_CREATE_JOINABLE' undeclared 
> (first use in this function)
> hello.c:41: error: `thread' undeclared (first use in this function)
> make: *** [hello.o] Error 1
> 
> i would appreciate your help thanks!
> 

It looks like you need to go through your configuration one more time
and make sure the pthreads options you need are all turned on. Your
compile command seems to have the right include, but you might want to
double check and make sure the file you're trying to include is actually
there, and the types it complains about are actually in it. 

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



More information about the Ecos-discuss mailing list