Code::Blocks Forums

User forums => Help => Topic started by: lamaatje on December 29, 2008, 06:21:44 am

Title: cmd line build works C::B build not???
Post by: lamaatje on December 29, 2008, 06:21:44 am
I am using svn build 5344.

I am trying to build code that uses a macro in an include:

#include BLA    BLA is defined via a compiler switch -DBLA=\"some dir\"

I enabled compiler logging to "full command line" en get the following in the log:

gcc -Wall -O0 -static  -g -DEZSP_HOST -DEZSP_UART -DPLATFORM_HEADER=\"hal/micro/unix/compiler/gcc.h\" -DCONFIGURATION_HEADER=\"app/ezsp-uart-host/ezsp-uart-host-configuration.h\"    -I../../.. -I../../../stack  -c /root/EmberZNet3.3.1/em260/app/ezsp-uart-host/uart-test-1.c -o obj/Debug/uart-test-1.o

/root/EmberZNet3.3.1/em260/app/ezsp-uart-host/uart-test-1.c:7:10: error: #include expects "FILENAME" or <FILENAME>

The include seems to fail but the strange thing is when I copypaste the command from the log to a terminal I open there is no problem it just compiles!!!! The error is only in C::B, I am flabbergasted, any explanation?
Title: Re: cmd line build works C::B build not???
Post by: thomas on December 29, 2008, 09:17:46 am
That is probably because you escape " as \".
Title: Re: cmd line build works C::B build not???
Post by: lamaatje on December 29, 2008, 10:58:55 am
That would make sense. No escaping does not work either.
Title: Re: cmd line build works C::B build not???
Post by: lamaatje on December 29, 2008, 11:21:07 am
escaping as //" seems to work.