I am writing a C program using the Eclipse CDT. I want to initialize mine for loops like this ...
for( int i = 0; i < 5; i++ )
so I added -std = c99 to the gcc command line. This has the side effect of throwing an error: "DT_REG uneclared (first use in this function) for the line:
if( dir_ent->d_type != DT_REG )
DT_REG is defined in dirent.h (which is included). The code compiles fine without -std = c99 on the gcc command line. What am I missing?
source
share