Hi Anthony,
If you specify "res" as an include directory via the "-I" or "--include-dir=" options, windres mistakenly assumes this to be the output format (and issues a warning saying to use "-J" instead). The workaround if you have such an input directory named "res" is to specify it as "./res", though this really shouldn't be necessary.
I am not sure if this important enough to be worth fixing. Especially there is a simple workaround as you have mentioned. I have a patch that will correct the behaviour (attached) but it has the potential to confuse users used to the old, deprecated, behaviour. If you really feel that this feature needs to be corrected in the sources please open a bug report on the binutils bugzilla system and I will make the patch official:
http://sourceware.org/bugzilla Cheers Nick Clifton
Index: binutils/windres.c =================================================================== RCS file: /cvs/src/src/binutils/windres.c,v retrieving revision 1.41 diff -c -3 -p -r1.41 windres.c *** binutils/windres.c 16 Nov 2009 11:12:37 -0000 1.41 --- binutils/windres.c 16 Jun 2010 14:43:23 -0000 *************** *** 45,50 **** --- 45,51 ---- #include "safe-ctype.h" #include "obstack.h" #include "windres.h" + #include <sys/stat.h> /* Used by resrc.c at least. */ *************** main (int argc, char **argv) *** 918,927 **** input_format_tmp = format_from_name (optarg, 0); if (input_format_tmp != RES_FORMAT_UNKNOWN) { ! fprintf (stderr, ! _("Option -I is deprecated for setting the input format, please use -J instead.\n")); ! input_format = input_format_tmp; ! break; } if (preprocargs == NULL) --- 919,941 ---- input_format_tmp = format_from_name (optarg, 0); if (input_format_tmp != RES_FORMAT_UNKNOWN) { ! struct stat statbuf; ! char modebuf[11]; ! ! if (stat (optarg, & statbuf) == 0 ! /* Coded this way to avoid importing knowledge of S_ISDIR into this file. */ ! && (mode_string (statbuf.st_mode, modebuf), modebuf[0] == 'd')) ! /* We have a -I option with a directory name that just happens ! to match a format name as well. eg: -I res Assume that the ! user knows what they are doing and do not complain. */ ! ; ! else ! { ! fprintf (stderr, ! _("Option -I is deprecated for setting the input format, please use -J instead.\n")); ! input_format = input_format_tmp; ! break; ! } } if (preprocargs == NULL)
_______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils