J
John F
Not exactly a C question (sorry), but I couldn't
find a ng that seems more suitable...
On the Unix shell command line I can successfully write
cc -DPATH=\"abcd/\" program.c -o program
to compile program as if it contained the line
#define PATH "abcd/"
But using the free MinGW http://www.mingw.org Windows
C compiler, then
gcc -DPATH=\"abcd\\\" program.c -o program
fails when written from a DOS Command Prompt window.
It kind of looks like the open quote hasn't closed
and the command line interpreter is waiting for the
command to be completed. I tried various and sundry
permutations like "\"abcd\\\"" and ""abcd\\"" and
\\\"abcd\\\\\", etc, but nothing I tried seems to work.
(The program compiles and runs fine without that switch,
using the default PATH.) What's the correct way to
write this? Thanks.
find a ng that seems more suitable...
On the Unix shell command line I can successfully write
cc -DPATH=\"abcd/\" program.c -o program
to compile program as if it contained the line
#define PATH "abcd/"
But using the free MinGW http://www.mingw.org Windows
C compiler, then
gcc -DPATH=\"abcd\\\" program.c -o program
fails when written from a DOS Command Prompt window.
It kind of looks like the open quote hasn't closed
and the command line interpreter is waiting for the
command to be completed. I tried various and sundry
permutations like "\"abcd\\\"" and ""abcd\\"" and
\\\"abcd\\\\\", etc, but nothing I tried seems to work.
(The program compiles and runs fine without that switch,
using the default PATH.) What's the correct way to
write this? Thanks.