I'm building an application that needs to compile on both Windows and Linux. The application is written in C, almost everything works except the MinGW compiler refuses this
typedef struct somestruct{
...snip...
enum {NODE, REAL} type;
};
somestruct* something;
switch (something->type){
case NODE:
...stuff...;
break;
case REAL:
...otherstuff...;
break;
}
It says NODE and REAL are not defined, But if I supply a scope resolution
case somestruct::NODE
This compiles with MinGW 3.4.1, but fails to compile with gcc 4.1.2 on linux. Is this simply a compiler issue that needs to be resolved with preprocessors or is there some other explanation?