ADC Home > Reference Library > Technical Q&As > Tools > Compiling & Debugging >

Using Pascal strings in Project Builder


Q: I'm getting warnings from the compiler (gcc) about my Pascal strings. How can I get them to be recognized in Project Builder?

A: Usually Pascal strings work just fine when doing Carbon development in Project Builder, but under some situations when building your project or checking syntax on a source file, you may run into the "unknown escape sequence '\p'" warning. This means that the compiler has not been told how to handle your Pascal strings. To fix this, go to your target's Build Settings tab and under Build Settings -> OTHER_CFLAGS add "-fpascal-strings". This tells the compiler to replace the '\p' with a byte containing the length of the string.


[Jun 27 2001]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.