I'm trying to compile a resource containg & in filename. how do I escape it? I
tried enclosing it in quotes and escaping it with \& and && - none of those work.
the command line would be:
windres -i 'proj&priv.rc' --input-format=rc -o 'proj&priv.rc' -O COFF
and I'm getting:
gcc: proj: No such file or directory
gcc: warning: `-x c' after last input file has no effect
gcc: no input files
'priv.rc' is not recognized as an internal or external command,
operable program or batch file.
c:\Dev-Cpp\bin\windres.exe: no resources
I tried escape chars \&, &&, enclosing in double quotes and none of it worked
The problem arises when windres invokes the preprocessor. By default windres
just calls popen, and when the arguments include file names with special
characters like '&', the wrong thing happens. The --use-temp-file option may
fix this. Otherwise, you need to patch open_input_stream() in binutils/resrc.c
to do appropriate quoting.
This PR should now be resolved. A patch to resrec.c has recently been checked
in which should ensure that filenames are properly quoted.