|Summary:||windres.exe is generating invalid RC output.|
|Product:||binutils||Reporter:||Josh @ Dreamland <joshv10>|
|Component:||binutils||Assignee:||Not yet assigned to anyone <unassigned>|
Description Josh @ Dreamland 2011-10-14 16:35:44 UTC
windres.exe is generating invalid RC output. Let me clarify: My project is on the large side, and is designed to be extensible. That said, a lot of systems can be changed out or removed, and some of said systems need their own RC file (for packing DLLs or including dialogs, for instance). The bottom line is, I have multiple RC files to link in, but MinGW does not support this. So instead of building COFF objects up front, I instruct it to recode the RC file such that it contains all resources in itself, then I generate a central resource file that #includes all of the generated files. The issue is that when asked to produce an RC file, it reads a perfectly valid input file, then exports a file containing syntax errors. I will add that compiling the files as individual COFF objects works fine (this is what I tried originally, before I realized that multiple resource objects are not correctly linked). It is when asked to bind all the resources into a new RC file that it goofs up. Technical information: Input line: EDITTEXT 12, 5, 43, 174, 15, ES_AUTOHSCROLL | ES_LEFT | WS_BORDER | WS_TABSTOP Build command: windres -o .eobjs/Windows/Windows/Run/Widget_Systems/Win32/res.rc -i Widget_Systems/Win32/res.rc -O rc Output line: EDITTEXT "", 12, 5, 43, 174, 15, 0x50810080 Full input file: http://pastebin.com/qbEbgGM2 Full output file: http://pastebin.com/pezHGLqy Other input files: manifest.xml: http://pastebin.com/vGi6SJcF Implications: The output format is invalid; the string causes windres to throw a syntax error later on when requested to build a COFF. OS and Version Information: Windows 7, x64 C:\Users\Josh>ld -v GNU ld (GNU Binutils) 126.96.36.19910804 C:\Users\Josh>windres --version GNU windres (GNU Binutils) 188.8.131.5210804 Copyright 2011 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:\Users\Josh>gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.1/lto-wrapper.exe Target: mingw32 Configured with: ../gcc-4.6.1/configure --enable-languages=c,c++,fortran,objc,ob j-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp - -disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runti me-libs --build=mingw32 --prefix=/mingw Thread model: win32 gcc version 4.6.1 (GCC) If you could suggest a workaround, please do so. I have managed to isolate the issue in my project such that it will, at present, not inhibit typical users. However, it is limiting forward progress for non-developers; my developers can simply correct the output themselves by removing the erroneous empty string it generates.
Comment 1 firstname.lastname@example.org 2012-02-11 15:15:37 UTC
CVSROOT: /cvs/src Module name: src Changes by: email@example.com 2012-02-11 15:15:34 Modified files: binutils : ChangeLog resrc.c Log message: PR binutils/13297 * resrc.c (write_rc_dialog_control): Omit text dump for EDITTEXT, COMBOBOX, LISTBOX, and SCROLLBAR. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/ChangeLog.diff?cvsroot=src&r1=1.1877&r2=1.1878 http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/resrc.c.diff?cvsroot=src&r1=1.40&r2=1.41
Comment 2 Kai Tietz 2012-02-11 15:16:42 UTC