I tried to add a preprocessor definition to a project exporter and it was containing a string like this:
That won’t load in XCode, telling me that the file is corrupted. I tried to add backslashes like this:FILE_NAME=\"filename.txt\"
But it did not work either.
How can I add a preprocessor definition that replaces this line of code: #define FILE_NAME "filename.txt"
unfortunately it still causes problems… I tried this:FILE_PATH="file"
Now the project loads, but Xcode wont read this as a string. I noticed, when entering these definitions manually into the project settings in xcode I had to write this to make it work: FILE_PATH=\"file\"
The result now looks like these leading backslashes aren’t added yet.
@chkn: I don’t want to replace an existing definition in my code - I want to have a preprocessor definition, that would do the same as the above noted “#define …” statement. So “replacement” was probably the wrong word for it. But I think jules understood
Well, I haven’t time to dig any deeper right now - the relevant code is in jucer_ProjectExport_XCode.h, line 789 if you want to tinker with it yourself.
The problem seems to be that the quotation mark " is being escaped with a backslash \ too early in the process and later on everything gets escaped again yielding this: