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 QAA24541; Mon, 5 Aug 2002 16:40:46 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA24524 for ; Mon, 5 Aug 2002 16:40:45 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g75EedD28450; Mon, 5 Aug 2002 16:40:39 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA24599; Mon, 5 Aug 2002 16:40:38 +0200 (MET DST) Date: Mon, 5 Aug 2002 16:40:38 +0200 From: Xavier Leroy To: "Kontra, Gergely" Cc: caml-list@inria.fr Subject: Re: [Caml-list] Yet Another Compilation Question: lablgtk for windows + cygwin-mingw Message-ID: <20020805164038.A21811@pauillac.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from kgergely@mlabdial.hit.bme.hu on Mon, Aug 05, 2002 at 03:49:46PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > I'm keep trying compiling ocaml to be able to produce optimized code. > When I try to configure lablgtk, it complains about not to find > gtk-config. I know there is such an executable under linux, but I > couldn't find this for the cygwin environment. > > While reading the manual, I realized, that I cannot exactly know what is > the difference between cygwin and mingw, because the mingw compilation > needs cygwin. My idea is to provide fallbacks for some utility, which > doesn't exists for mingw. I can't help you with the GTK issues, but let me try to clarify the Mingw/Cygwin issue. Mingw, at least as we use it in OCaml, is just an option on the Cygwin compilers and tools that instruct them to generate executables that do not depend on the Cygwin DLLs, but use standard Microsoft libraries instead. However, it is still possible, and indeed recommended, to use the full Cygwin development environment to build those Cygwin-free executables. Think of it as a cross-compiler: from within the Cygwin environment, you generate executables that can run without the Cygwin environment. So, I think there is no need to "provide fallbacks for some utilities", at least if these utilities are used only during the build process: just install the full Cygwin environment and be done with it. > And I don't understand why cygwin compiled > code is faster, because such tiny utilities like grep, sed, awk runs > _VERY_ slowly on my Duron. Yes, file accesses are a bit slow under Cygwin, due to the Unix emulation layer they have to cross. The OCaml bytecode interpreter is faster than in the native Win32 port, though, because it is compiled by gcc and takes advantage of gcc-specific tricks. > The distributed binary ocaml version is for MSVC, am I right? Yes. > Can I hack this version to use my mingw-gcc compiler? No. To install the Mingw version of OCaml, you need to compile OCaml from sources. One last, general comment. (Climbing on my soapbox.) The GNU compilers, OCaml, GTK. lablgtk, etc, are all software projects that are developed primarily under Unix, and then ported to Windows. While each of these ports are done carefully and with considerable ingenuity, Windows is not Unix and minor differences or inconsistencies remain in each port. These minor issues are usually workable when you use only one port, but can become a real headache when you pile up port over port over port. What I am coming at is that unless you like to suffer and are ready to solve these issues yourself, it doesn't make much sense to develop an OCaml+lablgtk+GTK program under Windows. Hope this helps, - Xavier Leroy ------------------- 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/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners