RE: running self compiled 32 bit binary on 64 bit Windows?
- Date: Wed, 6 Jun 2018 16:24:37 +0000
- From: "Soegtrop, Michael" <michael.soegtrop@xxxxxxxxx>
- Subject: RE: running self compiled 32 bit binary on 64 bit Windows?
for MinGW (your ldd dump didn't include Cygwin dlls, so I assume you are doing MinGW builds) I would recommend to compile 32 bit binaries using a 32 bit Cygwin (which can be installed on 64 bit machines).
The reason is that the Windows file system has some hacks. Some DLLs are available as 32 bit and 64 bit versions under the same file name and path, and which version you get depends on if a 32 bit or 64 bit process accesses them. For this reason a linker which is a 64 bit process and tries to link 32 bit bianries gets the 64 bit versions of system DLLs. So in order to link 32 bit apps you need a linker which runs as a 32 bit process and for this you need a 32 bit Cygwin.
The only other option (I know of) is to copy the required version of the required DLLs using a 32 bit or 64 bit copy program somewhere and tell the linker where to find them.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple