This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gfortran for windows creating 32bit executables
- From: Tim Prince <n8tm at aol dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 26 Jun 2014 11:34:21 -0400
- Subject: Re: gfortran for windows creating 32bit executables
- Authentication-results: sourceware.org; auth=none
- References: <847B845BC5C2D942BD21A6D4444B4B0869FD6ADD at NWB-EXCHANGE1 dot microfocus dot com>
- Reply-to: tprince at computer dot org
On 6/26/2014 11:04 AM, Steve Verdier wrote:
I've searched the gfortran pages, but can't seem to find a compiler for Windows 7 that creates 32bit executables (which I need for interfacing with non-fortran 32bit programs).
Is there such an animal, or is there a compiler switch for the MinGW64 compiler I have downloaded ? This name "x86_64-4.9.0-win32-seh-rt_v3-rev2" seems to imply 32bit, but I'm getting a link error when linking a subroutine created with that into a 32bit main program.
Maybe there are more of those than you bargained for, but the cygwin
setup offers 32- and 64-bit mingw gfortran compilers, as well as 32- and
64-bit "cygwin native." Even if you had a driver like the linux one
supporting -m32 switch, 32-bit mode relies on actually having 32-bit
compilers and libraries installed.
As you found, you can't mix 32- and 64-bit objects and linkers.
--
Tim Prince