This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Windres gives parsing errors when resource names begin with underscores


Hi Millenomi,

I was using a mingw cross-compiler to develop a game for Windows that
would target XP and Vista (among other platforms, thanks to SDL).
Vista requires, for games to appear in the Game Explorer window, that
a resource is included in the .exe file, among other things. The
resource must be named __GDF_XML (and be of the user type DATA), but
windres complains (parse error on line:...) when compiling a .rc file
such as:

__GDF_XML DATA MyVistaGameDefinitionFile.xml

> Can it be changed so that this works?


Possibly. Would you like to try out this (untested) patch and see if it works for you ?

Cheers
  Nick


Index: binutils/rclex.l
===================================================================
RCS file: /cvs/src/src/binutils/rclex.l,v
retrieving revision 1.14
diff -c -3 -p -r1.14 rclex.l
*** binutils/rclex.l	12 Oct 2005 00:16:12 -0000	1.14
--- binutils/rclex.l	20 Apr 2007 13:14:31 -0000
*************** static char *get_string (int);
*** 217,223 ****
  			    }
  			}
  
! [A-Za-z][^ ,\t\r\n]*	{
  			  char *s;
  
  			  /* I rejected comma in a string in order to
--- 217,223 ----
  			    }
  			}
  
! [_A-Za-z][^ ,\t\r\n]*	{
  			  char *s;
  
  			  /* I rejected comma in a string in order to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]