In the build phases of the shell, you can write to stderr in the following format:
<filename>:<linenumber>: error | warn | note : <message>\n
In the same format, gcc uses to display errors. File name: part of linenumber may be omitted. Depending on the mode (error, warning, note), Xcode will display your message with a red or yellow icon.
If you include the absolute path to the file and the line number (if an error occurred in the file), double-clicking on the error in the build log allows Xcode to open the file and go to the line, even if it is not part of the project. Very comfortably.
Nikolai Ruhe
source share