A
ashu
Hi all, I have a very trivial problem with conditional compilation. I
have a header file called
wrapper.h which is like the global header file for my project. In this
header file I want to define a conditional compilation tag called
DEBUG. This file wrapper.h includes several other files called demo1.h
demo2.c etc. as follows.
/***** wrapper.h****/
#define DEBUG
#include demo1.h
#include demo2.h
........
/*****end of wrapper.h**/
Now if I try to use the conditional compilation flag DEBUG in any of
these included files, like demo1.h or demo2.h I get an error and the
compilation fails.
/**** demo1.h ***/
# if defined (DEBUG)
#define BASE_ADDRESS
#endif
/***end of demo1.h***/
Can someone help me and point to me my mistake ? The compilation error
is BASE_ADDRESS undeclared and I am using GCC.
regards
/***end of demo1.h**/
have a header file called
wrapper.h which is like the global header file for my project. In this
header file I want to define a conditional compilation tag called
DEBUG. This file wrapper.h includes several other files called demo1.h
demo2.c etc. as follows.
/***** wrapper.h****/
#define DEBUG
#include demo1.h
#include demo2.h
........
/*****end of wrapper.h**/
Now if I try to use the conditional compilation flag DEBUG in any of
these included files, like demo1.h or demo2.h I get an error and the
compilation fails.
/**** demo1.h ***/
# if defined (DEBUG)
#define BASE_ADDRESS
#endif
/***end of demo1.h***/
Can someone help me and point to me my mistake ? The compilation error
is BASE_ADDRESS undeclared and I am using GCC.
regards
/***end of demo1.h**/