Reputation:
I have these two enum defined:
typedef enum {
PBUF_TRANSPORT,
PBUF_IP,
PBUF_LINK,
PBUF_RAW
} pbuf_layer;
typedef enum {
PBUF_RAM, /* pbuf data is stored in RAM */
PBUF_ROM, /* pbuf data is stored in ROM */
PBUF_REF, /* pbuf comes from the pbuf pool */
PBUF_POOL /* pbuf payload refers to RAM */
} pbuf_type;
which are used like this
p = pbuf_alloc(PBUF_RAW, PBUF_LEN_MAX, PBUF_POOL);
The .h file is included:
#include "src/include/lwip/pbuf.h"
There are no errors on the console when compiling, but the eclipse IDE says
"Symbol 'PBUF_POOL' could not be resolved cpswif.c /AM3359LWIPLibrary/cpsw/netif line 549 Semantic Error "
"Symbol 'PBUF_RAW' could not be resolved cpswif.c /AM3359LWIPLibrary/cpsw/netif line 549 Semantic Error"
All other variables and functions included in the .h
file seem to work fine, but these two not. What could be the problem?
Upvotes: 2
Views: 3047
Reputation: 553
Best guess: the code checker in Eclipse fails. I know it’s annoying but you just have to let them if there are no compile errors. A bit more information: The CDT (Eclipse for C/C++ plug-ins) has a framework called Codan (Code Analysis) which checks for syntax and semantic errors as far as possible. For that it uses the parsed code (CDT has an own parser and does not use the one you chose so it’s faster because you don’t always want to compile your code to see syntax errors in Eclipse) and does some checks. But the Codan is really buggy and I experienced it myself that there are just error markers you can’t get rid of. Sometimes it helps to restart Eclipse, clean the workspace (menu Project⇒clean) but mostly you can’t get rid of them without changing some code where the error is shown, save it, build it, delete it again and save and build again. That helped me at least sometimes. It’s horrible I know.
Upvotes: 3