Author Topic: C++ compiler: defining project option  (Read 3278 times)

Offline erotavlas

  • Multiple posting newcomer
  • *
  • Posts: 19
C++ compiler: defining project option
« 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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C++ compiler: defining project option
« Reply #1 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...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline erotavlas

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: C++ compiler: defining project option
« Reply #2 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C++ compiler: defining project option
« Reply #3 on: January 07, 2011, 04:51:53 pm »
You're not changing the correct place.
Please describe the steps you're using.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]