I am attempting to leverage c++ in an area of my code that has been written in C and includes other C headers. While moving a variable, in this case a static global to a class member, I had to included the C header which defined the structure. It is at that point that I started running into compiler problems withe headers which I presume are down the include chain. Some of these errors were repeated several times.
"C:/ti/ccsv5/tools/compiler/tms470/include/stdio.h", line 317: error: expected an identifier
"C:/ti/ccsv5/tools/compiler/tms470/include/stdio.h", line 317: error: expected a ";"
"C:/ti/ccsv5/tools/compiler/tms470/include/string.h", line 305: error: expected an identifier
"C:/ti/ccsv5/tools/compiler/tms470/include/string.h", line 305: error: expected a ";"
"C:/ti/ccsv5/tools/compiler/tms470/include/stddef.h", line 75: error: expected an identifier
"C:/ti/ccsv5/tools/compiler/tms470/include/stddef.h", line 75: error: expected a ";"
In each of these cases, the errors occured within a section beginning with:
#if defined(__cplusplus) && !defined(_CPP_STYLE_HEADER)
This project has grown to the point that it is difficult to map out the include dependencies. It appears the compiler is making several passes at these headers. Is it possible that one pass without the c++ symbols could be corrupting the state of the compiler for subsequent passes?