Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: erotavlas on January 07, 2011, 11:34:20 am

Title: C++ compiler: defining project option
Post by: erotavlas on January 07, 2011, 11:34:20 am
Hi all,

I'm under window 7 x64, Code::block 10.05 and cygwin 1.7.7.1 and I have to set a directive (#define WIN = 1) for conditional compiling. I have tried in project->properties-> project's build option->#define where I have specified WIN = 1, but it seems to have no effect.
Where should I go to set the directive?

Thank you
Title: Re: C++ compiler: defining project option
Post by: oBFusCATed on January 07, 2011, 01:39:37 pm
Read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Probably you should use "WIN=1" not "WIN = 1", but this is just a guess...
Title: Re: C++ compiler: defining project option
Post by: erotavlas on January 07, 2011, 04:31:39 pm
Hi,

thank you for your fast answer and for the links. This is my full command line...
Code
g++-3.exe -Wall -g -fexceptions -DWIN=0  -g    -I"C:/Codes"  -c "C:/Codes/main.c" -o obj/Debug/Codes/main.o

If I try to change from WIN = 0 to WIN = 1 there are no differences. Can you help me?
Title: Re: C++ compiler: defining project option
Post by: oBFusCATed on January 07, 2011, 04:51:53 pm
You're not changing the correct place.
Please describe the steps you're using.