From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA28102; Sun, 16 Sep 2001 20:10:24 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA30240 for ; Sun, 16 Sep 2001 20:10:23 +0200 (MET DST) Received: from adansonia.wanadoo.fr (smtp-rt-14.wanadoo.fr [193.252.19.224]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f8GIANr12668 for ; Sun, 16 Sep 2001 20:10:23 +0200 (MET DST) Received: from mahonia.wanadoo.fr (193.252.19.58) by adansonia.wanadoo.fr; 16 Sep 2001 20:10:23 +0200 Received: from fourquauche3ay (80.11.41.177) by mahonia.wanadoo.fr; 16 Sep 2001 20:09:51 +0200 From: "Lionel Fourquaux" To: , Subject: RE : [Caml-list] cygwin/mingw linking Date: Sun, 16 Sep 2001 20:03:54 +0200 Message-ID: <000001c13ed9$f39fb540$b1290b50@fourquauche3ay> X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal In-Reply-To: <13d.18306ae.28d627c1@aol.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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: owner-caml-list@pauillac.inria.fr [mailto:owner-caml- > list@pauillac.inria.fr] On Behalf Of CaptnJamesKirk@aol.com > Sent: Sunday, September 16, 2001 6:05 PM > To: caml-list@pauillac.inria.fr > Subject: Re: [Caml-list] cygwin/mingw linking > > In a message dated 9/14/2001 6:41:57 PM Central Daylight Time, > CaptnJamesKirk@aol.com writes: > > > Hi everyone, > > > > I've got OCaml 3.02 succesfully installed, compiled, and working under > > Windows ME using the latest cygwin. I would like to be able to link my > > programs using mingw so the executable doesn't need cygwin1.dll. The > docs > > mention using the -output-obj option to create an *.o object file that > can > > be linked, but the manual talks about wrapping this with a C program, > 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 > "hello_world.ml" with the "-output-obj" option to produce "camlprog.o". > 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 exited > from > cygwin and opened up my dos-box for mingw (which doesn't have the cygwin > bin > directory in it's path, so there's no conflict). I used the "camlprog.o" > which was created under cygwin and directed the linker to the ocaml libs. > Unfortunately, the linker now complains with, among other things, > > /cygwin/lib/ocaml/libasmrun.a(signals.o)(.text+0x17):signals.c: undefined > reference to `sigemptyset' > > If I'm not mistaken, these are references to some of the more "unix-like" > functions that cygwin provides and mingw doesn't so it can avoid using the > 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, it > doesn't require the pesky cygwin1.dll. > > /John > > ------------------- > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: > http://caml.inria.fr/FAQ/ > To unsubscribe, mail caml-list-request@inria.fr Archives: > http://caml.inria.fr ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr