|
From: ColdShine <col...@us...> - 2008-08-29 22:37:28
|
2008/8/30 Greg Chicares <gch...@sb...>: > On 2008-08-29 22:06Z, ColdShine wrote: >> >> C:\Profiles\ColdShine\Projects>windres -v -i empty.rc -o empty.res >> Using `gcc -E -xc -DRC_INVOKED empty.rc' >> Using popen to read preprocessor output >> windres: can't open file `XP': No such file or directory >> empty.rc:0: fatal error: when writing output to : Invalid argument >> compilation terminated. >> windres: preprocessing failed. >> >> So apparently now I have a different yet completely random error >> message, complaining about something that doesn't even exist in the >> preprocessed rc file: >> >> C:\Profiles\ColdShine\Projects>gcc -E -xc -DRC_INVOKED empty.rc >> # 1 "empty.rc" >> # 1 "<built-in>" >> # 1 "<command line>" >> # 1 "empty.rc" > > If you only want to get past the problem, try '--use-temp-file', > which sometimes magically resolves 'windres' issues. IT WORKS! Thank you so much! (And forgive me the all-caps.) Though it would be nice if someone could make this option more visible. It did cost me two days of attempts and brainstorming. For the sake of completeness, I'm replying to the remaining part of your message, too. > If you want to dig into it, try to find out what 'gcc' is doing. > As you can see, 'windres' invokes other programs in a pipeline; > 'gcc' is typically just a driver that invokes 'cpp' and so on. > Maybe you can use the '--preprocess' option of 'windres' to > pass a '-v' flag to 'gcc'. I already tried that way, invoking gcc with the very same command line windres reported to be using, and the result was just fine, as I reported above. > Weird errors like this might be caused by another program named > 'cpp.exe' that comes before MinGW 'cpp' on the $PATH. Neither this can be, as MinGW\bin is the first directory in my %Path% (sorry, I keep using Windows/DOS notation for envvars :) Thank you all for your efforts, guys. CS |