Community
Participate
Working Groups
Build ID: M20080911-1700 Steps To Reproduce: When defining a string under C/C++ Build->Settings->Symbols in the form: MESSAGE="\"Hello World\"" it works when using the External Builder but with the Internal Builder all the quotes are removed which results in syntax errors: **** Internal Builder is used for build **** gcc -DMESSAGE=\Hello World\ -O0 -g3 -Wall -c -fmessage-length=0 -osrc/hello-linux.o ../src/hello-linux.c gcc: World\: No such file or directory ../src/hello-linux.c: In function ‘main’: ../src/hello-linux.c:15: error: stray ‘\’ in program ../src/hello-linux.c:15: error: ‘Hello’ undeclared (first use in this function) ../src/hello-linux.c:15: error: (Each undeclared identifier is reported only once ../src/hello-linux.c:15: error: for each function it appears in.) Build error occurred, build is stopped Time consumed: 218 ms. It seems the internal builder removes all quotes? The same escaping can be used from the commandline successfully. More information:
The same command when using the External builder: gcc -DMESSAGE="\"Hello World\"" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/hello-linux.d" -MT"src/hello-linux.d" -o"src/hello-linux.o" "../src/hello-linux.c" A lot more quotes in there...
This bug is related with two other existing bugs: 186069 and 236227. I think this patch to 186069 will help. https://bugs.eclipse.org/bugs/attachment.cgi?id=130657
In CDT6.0RC2, the command line looks like: g++ -DFOO=bar biz with no attempt at quoting. Anyway, this is essentially the same issue as https://bugs.eclipse.org/bugs/show_bug.cgi?id=186069 Can somebody close this one as duplicate?