caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Question on opam mingw32/64 cross for Windows
@ 2016-05-06  9:04 Soegtrop, Michael
  0 siblings, 0 replies; only message in thread
From: Soegtrop, Michael @ 2016-05-06  9:04 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]

Dear OCaml Users,

I am working on a cygwin based cross opam for MinGW. There is one issue with this: on windows it is tricky to build 64 bit binaries with a 32 bit toolchain and vice versa. The reason is that the 32 bit and 64 bit system DLLs have the same names and which one you get depends on if the exe accessing it is a 32 bit or 64 bit app. So a 32 bit linker will see the 32 bit DLLs and a 64 bit linker will see the 64 bit DLLs due to some black magic in the Windows file system (at least as far as I know). So a 64 bit linker cannot easily link 32 bit apps.

I know two ways around this:


1.)    Use a 32 bit cygwin to build 32 bit MinGW apps and a 64 bit cygwin to build 64 bit MinGW apps

2.)    Use a 32 bit and a 64 bit copy program to copy the required system DLLs into different folders and tell the linker to get them from there

I wonder if someone has a better solution for this. If not, I would like to know which method the community prefers.

Method 1.) is not so nice for automated creation of multi-platform setups.

Method 2.) might require some adjustments in build files. Also it is tricky to create the two copy programs from sources without method 1.). And finally the system DLLs might change and it is not obvious when to redo the copying.

Best regards,

Michael

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

[-- Attachment #2: Type: text/html, Size: 6094 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-06  9:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-06  9:04 [Caml-list] Question on opam mingw32/64 cross for Windows Soegtrop, Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).