Author Topic: cmd line build works C::B build not???  (Read 2954 times)

Offline lamaatje

  • Single posting newcomer
  • *
  • Posts: 3
cmd line build works C::B build not???
« 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?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: cmd line build works C::B build not???
« Reply #1 on: December 29, 2008, 09:17:46 am »
That is probably because you escape " as \".
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline lamaatje

  • Single posting newcomer
  • *
  • Posts: 3
Re: cmd line build works C::B build not???
« Reply #2 on: December 29, 2008, 10:58:55 am »
That would make sense. No escaping does not work either.

Offline lamaatje

  • Single posting newcomer
  • *
  • Posts: 3
Re: cmd line build works C::B build not???
« Reply #3 on: December 29, 2008, 11:21:07 am »
escaping as //" seems to work.