I'm building an executable on windows using waf 2. The build includes multiple resource files. I'm using the latest windows sdk that I know of (version 10.0.19041.0). I'm encountering 2 separate but related issues. Both appear to be related to the windows resource compiler and long paths.
First, if one of the include paths includes spaces, then all of the include path arguments must either be on the command line or all of the include paths must be included in the INCLUDE environment variable. If I try to list the long paths in the INCLUDE environment variable and leave the rest of the include paths on the command line then I get the following error from rc.exe:
fatal error RC1107: invalid usage
If I either put all of the include paths in the INCLUDE environment variable or I list all of the include paths on the command line then this error does not occur.
If I let waf put all of the command line arguments in a response file rc.exe gives me the same error as above:
fatal error RC1107: invalid usage
In order to add all of the include paths to a response file I must use windows short path names.
So, if I have any include paths that are long paths, I must either force waf to not use response files or I need to put all of the include paths in the INCLUDE environment variable.
I'd really like to either put all of the command line arguments, including the long paths, in a response file, or I'd like to put the long paths into the INCLUDE environment variable and let waf handle the reset of the arguments automatically.
What, if anything, can I do to let rc.exe handle long paths in a response file? What, if anything, can I do to let rc.exe handle long paths in an environment variable and other paths on a response file?
Note that I have tried putting the long paths into quotes. I have also tried escaping the spaces in the long paths. Neither works.