Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] cygwin/mingw linking
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Lionel Fourquaux <lionel.fourquaux@w...>
Subject: RE : [Caml-list] cygwin/mingw linking
I think that you should use the win32 version of ocaml instead if the
cygwin one. You may want to rebuild it to use the mingw tools. It's not
entirely trivial, but it has already been done. The Unix lib causes some
problems, though.

> -----Original Message-----
> From: [mailto:owner-caml-
>] On Behalf Of
> Sent: Sunday, September 16, 2001 6:05 PM
> To:
> Subject: Re: [Caml-list] cygwin/mingw linking
> In a message dated 9/14/2001 6:41:57 PM Central Daylight Time,
> writes:
> > Hi everyone,
> >
> >  I've got OCaml 3.02 succesfully installed, compiled, and working
> >  Windows ME using the latest cygwin. I would like to be able to link
> >  programs using mingw so the executable doesn't need cygwin1.dll.
> docs
> >  mention using the -output-obj option to create an *.o object file
> can
> >  be linked, but the manual talks about wrapping this with a C
> etc.,
> >  which is not what I want. I just want to manually link the object
> file(s)
> >  with whichever libraries are needed, using a separate mingw
> installation.
> > Can I do this?
> >
> >  /John
> Doesn't look like it's possible now. Here's what I tried. I compiled
> "" with the "-output-obj" option to produce
> Next,
> still under cygwin, I tried "gcc -o hello_world camlprog.o -lgdi32
> -L/usr/lib/ocaml -lasmrun" and it worked! So, I could manually link a
> complete ocmal program without wrapping with a C program. Next, I
> from
> cygwin and opened up my dos-box for mingw (which doesn't have the
> bin
> directory in it's path, so there's no conflict). I used the
> which was created under cygwin and directed the linker to the ocaml
> Unfortunately, the linker now complains with, among other things,
> /cygwin/lib/ocaml/libasmrun.a(signals.o)(.text+0x17):signals.c:
> reference to `sigemptyset'
> If I'm not mistaken, these are references to some of the more
> functions that cygwin provides and mingw doesn't so it can avoid using
> cygwin1.dll. So it looks like even a simple "hello world" program need
> things
> from the ocaml libs that call the cygwin1.dll.
> This is unfortunate. I think support for mingw would be a big plus for
> ocaml.
> Not only is mingw easier to install and use under Windows than cygwin,
> doesn't require the pesky cygwin1.dll.
> /John
> -------------------
> Bug reports:  FAQ:
> To unsubscribe, mail  Archives:

Bug reports:  FAQ:
To unsubscribe, mail  Archives: