Altera_Forum
Honored Contributor
16 years agoC-Typedef struct with µClinux
Hi all,
I'm trying to use in my header file the simple following code : typedef enum { COUNTER1 = 0, COUNTER2 = 1, } ERRORCOUNTER; and in my .c main file something like : U32 GetErrorCount(errorcounter Counter,FE_STV0900_DEMOD_t Demod) { ... /*Read the Error value*/ switch(Counter) { case COUNTER1: ... } but when I compile, I always get the same compilation error : "error: `ERRORCOUNTER' undeclared (first use in this function)" whereas I checked the# include header declarations twice !! So here is my question : can we use typedef enum and typedef struct in µClinux ?? Thanks for your help !