S
sinbad
Hi,
there is a source file "common.c" which will get linked with different
modules.
the code in common.c will look like this.
common.c
--------
#ifdef FEAT_ENABLE
/* function_set_1*/
#else
/* function_set_2*/
#endif
there are two different independent modules(1.c, 2.c) each with it's
own main()
function. Now i want 'function_set_1' for 1.c and 'function_set_2" for
2.c.
So i need to define FEAT_ENABLE for 1.c and must not define
FEAT_ENABLE for 2.c;
The question here is how do i do this without adding any module
specific headers
in common.c;
Any module specific header with "#define FEAT_ENABLE" will get
reflected for other
modules and function_set_2 will get included instead of
function_set_1;
there is a source file "common.c" which will get linked with different
modules.
the code in common.c will look like this.
common.c
--------
#ifdef FEAT_ENABLE
/* function_set_1*/
#else
/* function_set_2*/
#endif
there are two different independent modules(1.c, 2.c) each with it's
own main()
function. Now i want 'function_set_1' for 1.c and 'function_set_2" for
2.c.
So i need to define FEAT_ENABLE for 1.c and must not define
FEAT_ENABLE for 2.c;
The question here is how do i do this without adding any module
specific headers
in common.c;
Any module specific header with "#define FEAT_ENABLE" will get
reflected for other
modules and function_set_2 will get included instead of
function_set_1;