Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this error mean: "error: expected specifier-qualifier-list before 'type_name'"?

I've been working on the Cell processor and I'm trying to create a struct that will hold an spe_context_ptr_t, which will be used within the thread to launch an spe context and will also hold a pointer to something else that will be passed to the spu context from within the thread (currently I'm trying to just make it a generic pointer, but in actuality it will be a pointer to another structure I've defined). When I try and compile, I get the following error:

spu/../common.h:38: error: expected specifier-qualifier-list before 'spe_context_ptr_t'  // here is the offending line(s)  typedef struct _PTHREAD_BLOCK {     spe_context_ptr_t * context; // Error happens here     uintptr32_t  args;   } PTHREAD_BLOCK; 
like image 647
Paul Wicks Avatar asked Mar 03 '09 21:03

Paul Wicks


1 Answers

The compiler doesn't know that spe_context_ptr_t is a type. Check that the appropriate typedef is in scope when this code is compiled. You may have forgotten to include the appropriate header file.

like image 102
Trent Avatar answered Oct 07 '22 14:10

Trent