This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Can't link .res file (from windres) using i686-pc-mingw32-g++
- From: Jim Reisert AD1C <jjreisert at alum dot mit dot edu>
- To: cygwin at cygwin dot com
- Date: Thu, 25 Feb 2016 07:50:37 -0700
- Subject: Re: Can't link .res file (from windres) using i686-pc-mingw32-g++
- Authentication-results: sourceware.org; auth=none
- References: <CAK-n8j6Uq2c-a_Vz1nWq3aZSH6L8yzq5xh3ipOPUqJ+yjPAaNw at mail dot gmail dot com> <56CE833C dot 2040200 at maxrnd dot com>
On Wed, Feb 24, 2016 at 9:29 PM, Mark Geisert wrote:
> Just a guess: your 64-bit windres is generating a 64-bit .res file that the
> 32-bit g++ can't grok. Look at 'windres -h'. There's a "-F" == "--target"
> flag that can specify a target type. I would try adding "-F pe-i386" after
> the "-O coff" on your command. If windres doesn't accept both -O and -F,
> try leaving off the "-O coff" and just specify the -F flag and value.
Thanks, Mark, that worked! I assumed that -O coff would "do the right
thing" by itself. I did not realize that "format" and "target" were
independent. I finally read somewhere that by default, windres picks
the target that is listed first when getting help via "-h". In my
case that was pe-x86-64, which was wrong for what I wanted to do.
- Jim
--
Jim Reisert AD1C, <jjreisert@alum.mit.edu>, http://www.ad1c.us
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple