Delivered-To: lablgtk at yquem.inria.fr DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=snef.ro; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Pn5L4E9EHH3eirMv4fSlt8nH5G36mgWlWC7KJYJeDJAgE9K5tDTkzkXE2bKAixKb/ZYN3MOMkcvBhosiDnrfrJUohAtSYaYobMbndugtEmRz6V7XZO4OkvPDdpSSvz1DwdXyHoU4jecrQ0SUOYIaCrlLrMwrzxdDk3lXAIJp7pU=; Message-ID: <46DEFBAB.8070109 at wanadoo.fr> Date: Wed, 05 Sep 2007 21:55:39 +0300 From: Arnold Guillaumot MIME-Version: 1.0 To: Dawid Toton Subject: Re: [Lablgtk] Compiling with Cygwin/MinGW References: In-Reply-To: Content-Transfer-Encoding: 7bit Cc: lablgtk at math.nagoya-u.ac.jp Content-Type: text/plain; charset=UTF-8 Content-Length: 2975 Hi, I succeeded in the past to build ocaml and lablgtk with MinGW/MSYS (without Cygwin), together with ocamlmklib. In the ocaml tree, change the following files: 1) ocamlmklib The 'trick' is to copy the Makefile part of ocamlmklib in the Makefile.nt edit tools/Makefile.nt and change the Line 26 all: ocamldep ocamlprof ocamlcp.exe ocamlmktop.exe primreq in all: ocamldep ocamlprof ocamlcp.exe ocamlmktop.exe primreq ocamlmklib.exe append the following lines after the ocamlmktop part: # To help building mixed-mode libraries (Caml + C) ocamlmklib.exe: myocamlbuild_config.cmo ocamlmklib.cmo $(CAMLC) $(LINKFLAGS) -o ocamlmklib.exe myocamlbuild_config.cmo ocamlmklib.cmo ocamlmklib.cmo: myocamlbuild_config.cmi myocamlbuild_config.ml: ../config/Makefile ../build/mkmyocamlbuild_config.sh cp ../myocamlbuild_config.ml . install:: cp ocamlmklib.exe $(BINDIR)/ocamlmklib.exe clean:: rm -f ocamlmklib.exe ocamlmklib.ml: ocamlmklib.mlp ../config/Makefile echo '(* THIS FILE IS GENERATED FROM ocamlmklib.mlp *)' >ocamlmklib.ml sed -e "s|%%BINDIR%%|$(BINDIR)|" \ -e "s|%%SUPPORTS_SHARED_LIBRARIES%%|$(SUPPORTS_SHARED_LIBRARIES)|" \ -e "s|%%MKSHAREDLIB%%|$(MKSHAREDLIB)|" \ -e "s|%%BYTECCRPATH%%|$(BYTECCRPATH)|" \ -e "s|%%NATIVECCRPATH%%|$(NATIVECCRPATH)|" \ -e "s|%%MKSHAREDLIBRPATH%%|$(MKSHAREDLIBRPATH)|" \ -e "s|%%RANLIB%%|$(RANLIB)|" \ ocamlmklib.mlp >> ocamlmklib.ml beforedepend:: ocamlmklib.ml clean:: rm -f ocamlmklib.ml 2) Windows limitations on command-line length You would also need to change utils/ccomp.ml as follows to build ocaml with MinGW/MSYS, because MinGW does not like @responsefile: let s = String.concat " " (List.map (fun f -> if f = "" then f else Filename.quote f) lst) in - if Sys.os_type = "Win32" && String.length s >= 256 - then build_diversion lst - else s + s I hope that can help you The rest is in the README.win32 file. regards, Dawid Toton wrote: > I'm trying to compile LablGTK (current version from SVN) on Cygwin + > MinGW. But I have no ocamlmklib (it's only with pure Cygwin port). > Do I have to write new makefile, which would mimic behaviour of > ocamlmklib? > Did anybody manage to compile LablGTK with MinGW tools? > Is it possible to stole ocamlmklib from Cygwin port and force it to do > things correctly? > > Dawid Toton > > _______________________________________________ > Lablgtk mailing list > Lablgtk@yquem.inria.fr > http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk > --------------------------------------------------------------------------------------- > > Orange vous informe que cet e-mail a ete controle par l'anti-virus > mail. Aucun virus connu a ce jour par nos services n'a ete detecte. > > > _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk