semicolon for define

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

semicolon for define

Post by Jarod42 » Thu Oct 08, 2020 7:26 pm

`;` 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: 6133
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: semicolon for define

Post by eranif » Sat Oct 10, 2020 6:18 pm

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

Jarod42
CodeLite Expert
Posts: 194
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: semicolon for define

Post by Jarod42 » Sat Oct 10, 2020 10:41 pm

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

Will look at the fix later.

Post Reply