We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm converting some C code from Archimedies to Keil version 7.0 and I don't know why this error C129 is popping up. I thought is was because in Archimedies xdata came before uchar so I switched around all xdata variables in the Global.c and Global.h files but still had the error. So I inserted a new #define line above the error point but still have the error. Here is how the codes is written and the error message points to the BOLD text line: Global.c file #include "header.h" #include "global.h"
/* The following are BIT status errors */
uchar xdata arincReceive0Counter; uchar xdata arincReceive1Counter; uchar xdata CurrentlyUsedARINC;
Global.h file #define ARINC_CHAN0_CHK_BSY ARINC_CHAN0 + ARINC_CHK_BSY #define ARINC_CHAN0_USED ARINC_CHAN0 + ARINC_USED #define ARINC_CHAN1_CHK_BSY ARINC_CHAN1 + ARINC_CHK_BSY #define ARINC_CHAN1_USED ARINC_CHAN1 + ARINC_USED
extern uchar xdata arincReceive0Counter; extern uchar xdata arincReceive1Counter; extern uchar xdata CurrentlyUsedARINC;
Got any ideals?
IMHO if you need to use guard names your organisatorial skills are lacking, but that is another story. Many use them out of habit or because they were taught by a user of such.
Might possibly be true for C code, but when using C++ with templates and mixing with existing C++ libraries you might have great need of include guards. It is quite common that some classes are building stones for a number of libraries that are used either stand-alone or in a group.
An example: My code uses existing library X, and existing container class Y. Without being the author of library X, it isn't obvious to know if library X makes use of the include files for class Y, or if it will make use of the Y include file one year from now.