I'm trying to use VSLICKERRORPATH so that it can be used to find files with errors, and I'm mostly successful, except for a certain case.
On my very first build after cloning a repo, the directory that all compilation errors will be relative to does not yet exist. It will get created by the build script.
My understanding is that VSLICKERRORPATH will get set to the directory where the build command is run, and this is set in either:
The value in Tools->Build, "Run from dir"
or
Project->Properties "Working Directory" when the "Run from dir" option in Tools->Build set to "%rw"
But when this directory does not yet exist, I get errors when the build starts:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Now my build script still executes as I provide an absolute path to that in "Tools->Build->Command line" and the build script is coded such that it properly functions no matter which directory it is run from.
But in this case where the directory doesn't yet exist, the error parsing is taking me to the wrong file (I have multiple main.c in my project, it brings me to the wrong main.c, not the one with the error).
However if the build directory does exist at the start of the build, then the error parsing is finding the correct main.c.
So how to set the VSLICKERRORPATH to a directory that may not exist at the time the build starts? Can it be different than the directory used for "run from dir"?
So I found I can set it from the "Advanced" button for the "Build" tool, but there are 2 problems I encountered here:
1) I want to specify it relative to the project directory. But if I use %rp in the setting of the environment variable, the %rp does not expand to the project directory.
2) I would have to set VSLICKERRORPATH 2 times instead of just 1 time, for each of "Rebuild" and "Build"
Then I tried to add the build directory to the list of "Includes" in Project->Properties->Directories, but that doesn't seem to be working. The error parsing is taking me to the wrong main.c Even using the absolute path and not using a %rp, it doesn't seem to find it this way. It would be nice if %rp could be used in this list, but not sure if that will work?