Kris K.
stranger
Reged: Jan 30 2008
Posts: 2
|
|
We have an existing makefile used with previous versions under Linux. Right now I am using the C51 v9.01 compiler under Windows XP. My problem is in using the -Dmacro=text command line option. Previously, we used the option as Code:
-Dmacro=\"text\"
which gave us something equivalent to Code:
#define macro "text" in the final code. However, now, using the same command line option, the result is equivalent to Code:
#define macro text
Is it possible to escape quotation marks to get to the previous behavior?
|
lucky
HI-TECH team member
   
Reged: Oct 06 2003
Posts: 1072
Loc: Brisbane, Australia
|
|
Quote:
Is it possible to escape quotation marks to get to the previous behavior?
It is possible - I have done this before, however I'm not in front of a windows machine at the moment. From memory I think you use single quotes around the double quotes. Backslash escaping is not needed. The windows command line is not great. An alternative is to install the cygwin package and then your existing makefiles etc.. will still work unchanged (or keep using the linux version of the compiler).
-------------------- Matt Luckman
HI-TECH Software
|
Kris K.
stranger
Reged: Jan 30 2008
Posts: 2
|
|
Quote:
From memory I think you use single quotes around the double quotes. Backslash escaping is not needed.
Strangely enough, using single quotes Code:
-Dmacro='"text"'
gives the equivalent of Code:
#define macro 'text'
So it removes the double quotes completely.
Any further ideas would be greatly appreciated. I may switch back to the Linux version of the compiler, but I'd like to be able to compile this under Windows. Thanks.
|
Dan Henry
Guru
  
Reged: Oct 16 2003
Posts: 3445
Loc: Boulder, Colorado U.S.A.
|
|
Quote:
I'd like to be able to compile this under Windows.
As lucky mentioned cygwin is quite helpful in this regard.
|