Post

Replies

Boosts

Views

Activity

Reply to Xode project fails to compile a simple C++ class
Alright, I found the issue. The code generator creates the Xcode project as an XML file. If I open it in Xcode and apply a change to it, Xcode automatically converts the file to the other non-XML file format (i.e. as shown in the question). Now, the code generator emits the following problematic code: &#9;&#9;&#9;&#9;... &#9;&#9;&#9;&#9;<key>projectDirPath</key> &#9;&#9;&#9;&#9;<string> &#9;&#9;&#9;&#9;</string> &#9;&#9;&#9;&#9;... &#9;&#9;&#9;&#9;<key>projectRoot</key> &#9;&#9;&#9;&#9;<string> &#9;&#9;&#9;&#9;</string> &#9;&#9;&#9;&#9;.. Both keys ("projectDirPath" / "projectRoot") should have an empty string as value and it actually does look like it is empty in the above XML. However, Xcode interprets it differently. If the XML file is converted to the other format it looks as follows: ... projectDirPath = "\n\n&#9;&#9;&#9;&#9;"; projectRoot = "\n\n&#9;&#9;&#9;&#9;"; ... So, Xcode interprets the whitespace between <string> and </string> as actual value. To fix it, the code generator must be adjusted to emit &#9;&#9;&#9;&#9;... &#9;&#9;&#9;&#9;<key>projectDirPath</key> &#9;&#9;&#9;&#9;<string></string> &#9;&#9;&#9;&#9;... &#9;&#9;&#9;&#9;<key>projectRoot</key> &#9;&#9;&#9;&#9;<string></string> &#9;&#9;&#9;&#9;... or <string /> or any other valid way instead of the above approach. That actually fixes the problem.
Oct ’20