F
fl
Hi,
I have a complete C project which is under Linux. It has a Makefile
(part of that in the end of this post, see below please). I can
compile it, no problem.
Now, I want to learn it in Eclipse CDT in OPENSUSE 12.1. I cannot find
how to setup the -D variable in CDT. The C function using that
variable is below the dot line. I tried several symbol configuration.
It turned out it took effect to all the C files. Many errors pop up on
that variable. I would like to know how to set -D variable only to one
C file using that variable.
Could you tell me how to do that?
Thanks a lot.
............................
C function:
//////
if (!initialized)
{
f = fopen(RAND_FILE,"rb");
/* f = fopen("randfile","rb");*/
...............
Makefile:
//////
modules:
$(COMPILE) bloio.c
$(COMPILE) chk.c
$(COMPILE) opeeen.c
$(COMPILE) monse.c
$(COMPILE) morse.c
$(COMPILE) moert.c
$(COMPILE) daaab.c
$(COMPILE) -DRAND_FILE=\"`pwd`/randfile\" rand.c
I have a complete C project which is under Linux. It has a Makefile
(part of that in the end of this post, see below please). I can
compile it, no problem.
Now, I want to learn it in Eclipse CDT in OPENSUSE 12.1. I cannot find
how to setup the -D variable in CDT. The C function using that
variable is below the dot line. I tried several symbol configuration.
It turned out it took effect to all the C files. Many errors pop up on
that variable. I would like to know how to set -D variable only to one
C file using that variable.
Could you tell me how to do that?
Thanks a lot.
............................
C function:
//////
if (!initialized)
{
f = fopen(RAND_FILE,"rb");
/* f = fopen("randfile","rb");*/
...............
Makefile:
//////
modules:
$(COMPILE) bloio.c
$(COMPILE) chk.c
$(COMPILE) opeeen.c
$(COMPILE) monse.c
$(COMPILE) morse.c
$(COMPILE) moert.c
$(COMPILE) daaab.c
$(COMPILE) -DRAND_FILE=\"`pwd`/randfile\" rand.c