windres 2.18.50 contains the following regression relative to 2.17.50: C:\demo>dir /s /b C:\demo\foo C:\demo\quux.rc C:\demo\windres-2.17.50-20060824.exe C:\demo\windres-2.18.50-20071123.exe C:\demo\foo\bar.txt C:\demo>type quux.rc bar.txt eieio foo/bar.txt C:\demo>type foo\bar.txt anything C:\demo>ren windres-2.17.50-20060824.exe windres.exe C:\demo>.\windres --version GNU windres 2.17.50 20060824 Copyright 2005 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. C:\demo>.\windres quux.rc quux1.o C:\demo>ren windres.exe windres-2.17.50-20060824.exe C:\demo>ren windres-2.18.50-20071123.exe windres.exe C:\demo>.\windres --version GNU windres (GNU Binutils) 2.18.50.20071123 Copyright 2007 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. C:\demo>.\windres quux.rc quux2.o .\windres: can't open file `foo': Permission denied Both windres executables were downloaded from mingw.org. windres-2.17.50- 20060824.exe contains MinGW-specific patches, but windres-2.18.50-20071123.exe was built from plain FSF sources. Chris Sutcliffe has confirmed that this bug is present in the binutils 2.18.50- 20071229 snapshot (see http://article.gmane.org/gmane.comp.gnu.mingw.user/24972 ).
Created attachment 2181 [details] Allow colon, underscore, and path seperators for not quoted strings I patched the token lexer to allow typical file name characters as ':', '_', '/', and '\\' as secondary token characters in rclex.c.
Similar problems on a Linux host with target mingw32. A simple workarrount is to use "Quotes" for filename. 2 ICON foo-bar.ico This line in rc file failed in binutils 2.18.50 with message i686-pc-mingw32-windres: can't open icon file `foo': No such file or directory 2 ICON "foo-bar.ico" Worked without patch I Mean your hack would not work all times. What is with '-' in filenames or utf8?
(In reply to comment #2) > 2 ICON foo-bar.ico > This line in rc file failed in binutils 2.18.50 with message > i686-pc-mingw32-windres: can't open icon file `foo': No such file or directory binutils 2.18.50-20071229 was used for the line above.
(In reply to comment #3) > (In reply to comment #2) > > 2 ICON foo-bar.ico > > This line in rc file failed in binutils 2.18.50 with message > > i686-pc-mingw32-windres: can't open icon file `foo': No such file Sorry for confusing. binutils-2.18.50-20080109 was used
Have compiled binutils-2.18.50-20080109-src.tar.gz with host: Linux, target: mingw32. Filenames with paths works now. Filename with '-' dosn't work. Filename with "Quotes" works in all versions (old and new). $ cat test.rc 2 ICON "dir/foo-bar.ico"
Created attachment 2221 [details] Also allow hypens in file names
Hi Gordon, This appears to be due to a small omission in Kai's original patch. Kai - is there any reason not to apply the uploaded extension to your patch ? Cheers Nick
Sorry, I simply didn't saw it. No there is no reason for that AFAICS.
Hi Kai, OK, I have applied the patch along with this changelog entry. Cheers Nick binutils/ChangeLog 2008-01-28 Nick Clifton <nickc@redhat.com> PR binutils/5529 * rclex.c (yylex): Also allow the hypen character.