semicolon for define

General questions regarding the usage of CodeLite
User avatar
Jarod42
CodeLite Expert
Posts: 237
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

semicolon for define

Post by Jarod42 »

`;` is used as separator for C/C++ Compiler options and in Preprocessors. (probably not the only place though).

How can we "escape" it for regular use?

Code: Select all

-D"SEMICOLON=;"
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: semicolon for define

Post by eranif »

Basically passing "strings" as macros, should be double wrapped, so it should be done like this:

Code: Select all

-DSEP=\"";"\"
The problem is that CodeLite does not parse this correctly in the project settings -> compiler -> pre-processor section

I did fix that in git master, but this is not released yet

Eran
Make sure you have read the HOW TO POST thread
User avatar
Jarod42
CodeLite Expert
Posts: 237
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: semicolon for define

Post by Jarod42 »

My problem is semi colon, I succeed to escape quote (normally).

Will look at the fix later.
Post Reply