Hi,
In libiconv/lib/Makefile.in:
libiconv.res.lo : $(srcdir)/../windows/libiconv.rc
$(LIBTOOL_COMPILE) --tag=RC $(RC) `$(SHELL) $(srcdir)/../windows/windres-options --escape $(PACKAGE_VERSION)` -i $(srcdir)/../windows/libiconv.rc -o libiconv.res.lo --output-format=coff
In libiconv/src/Makefile.in:
iconv.res : $(srcdir)/../windows/iconv.rc
$(WINDRES) `$(SHELL) $(srcdir)/../windows/windres-options --escape $(PACKAGE_VERSION)` -i $(srcdir)/../windows/iconv.rc -o iconv.res --output-format=coff
When compiling libiconv on Cygwin-MSVC, Both $(RC) and $(WINDRES) are default to windres program.
To build an x86 version libiconv in a 64-bit Windows machine, I have to set both RC="windres -Fpe-i386" and WINDRES="windres -Fpe-i386" in configure option.
However "-F" option is omitted by default, (I guess) as it comes from 32-bit old days and there is no need for 64-bit concerns at that time.
It is critical to have "-F" option now, otherwise I will fail to link a 32-bit dll/exe with a 64-bit res object.
See the attached patch file. But I only tested this patch on the Cygwin-MSVC build.
Sincerely,
Feiyun Wang