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 OAA20712; Sat, 15 May 2004 14:31:38 +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 OAA20965 for ; Sat, 15 May 2004 14:31:36 +0200 (MET DST) Received: from vanish.yandex.ru (vanish.yandex.ru [213.180.200.4]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i4FCVZEV030301 for ; Sat, 15 May 2004 14:31:35 +0200 Received: from ppp155-33.dialup.mtu-net.ru ([62.118.155.33]:4877 "EHLO [62.118.155.33]" smtp-auth: "ekot") by mail.yandex.ru with ESMTP id ; Sat, 15 May 2004 16:31:13 +0400 Message-ID: <40A60D8E.9030108@narod.ru> Date: Sat, 15 May 2004 16:31:10 +0400 From: Eugene Kotlyarov Reply-To: ekot@narod.ru Organization: home User-Agent: Mozilla Thunderbird 1.5.0.4d (Windows/20040502) X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] Building PCRE-OCaml on Win32 References: <40A12CF0.2070406@lophty.com> In-Reply-To: <40A12CF0.2070406@lophty.com> Content-Type: multipart/mixed; boundary="------------080703090406030905090002" X-Miltered: at nez-perce with ID 40A60DA7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; ekot:01 caml-list:01 pcre-ocaml:01 pcre-ocaml:01 mingw:01 pcre:01 mingw:01 cygwin:01 pcre:01 cflags:01 libs:01 libpcre:01 usr:01 incdirs:01 usr:01 X-Attachments: name="OCamlMakefile.diff" name="OCamlMakefile.diff" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is a multi-part message in MIME format. --------------080703090406030905090002 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit brian donovan wrote: > > If anyone has gotten PCRE-OCaml working on Win32 w/the MinGW port of > OCaml 3.0.7 w/out MSVC installed, please skip the rest of my email > (describing what I tried and what happened) and tell me what I need to do. I've just tried to make it work. First thing you need is PCRE itself built for MingW, unfortunately Cygwin package won't work. In PCRE folder do $ ./configure CFLAGS='-mno-cygwin -O2' $ make $ cp .libs/libpcre.a /lib/mingw/ $ cp pcre.h /usr/include/mingw/ Make will give you error in the end but that's not a problem. Then in pcre-ocaml folder set variables in Makefile.conf to following export STATIC = yes export MINGW := 1 export INCDIRS :=/usr/include/mingw export LIBDIRS :=/lib/mingw export CFLAGS := -O2 -mno-cygwin -DPCRE_STATIC Then remove CFLAGS = -O2 line from lib/makefile Replace OCamlMakefile with latest version (6.11.0) and apply attached patch to it. Than do make and make examples for testing. If it will work you can then do make install. --------------080703090406030905090002 Content-Type: text/plain; name="OCamlMakefile.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="OCamlMakefile.diff" --- OCamlMakefile.orig 2004-05-14 23:16:01.734375000 +0400 +++ OCamlMakefile 2004-05-14 19:21:55.781250000 +0400 @@ -421,7 +421,7 @@ RES_CLIB := lib$(CLIB_BASE).$(EXT_LIB) endif -ifndef MSVC +ifndef WIN32 DLLSONAME := dll$(CLIB_BASE).so endif @@ -431,7 +431,7 @@ $(NCRESULT).cmi $(NCRESULT).cmx $(NCRESULT).o \ $(RES_CLIB) $(IMPL_CMO:.cmo=.annot) -ifndef MSVC +ifndef WIN32 ifndef STATIC NONEXECS += $(DLLSONAME) endif @@ -440,7 +440,7 @@ ifndef LIBINSTALL_FILES LIBINSTALL_FILES := $(RESULT).mli $(RESULT).cmi $(RESULT).cma \ $(RESULT).cmxa $(RESULT).$(EXT_LIB) $(RES_CLIB) - ifndef MSVC + ifndef WIN32 ifndef STATIC ifneq ($(strip $(OBJ_LINK)),) LIBINSTALL_FILES += $(DLLSONAME) @@ -815,7 +815,7 @@ .SUFFIXES: .mli .ml .cmi .cmo .cmx .cma .cmxa .$(EXT_OBJ) \ .mly .di .d .$(EXT_LIB) .idl .c .$(EXT_CXX) .h .so \ .rep .zog .glade -ifndef MSVC +ifndef WIN32 $(DLLSONAME): $(OBJ_LINK) $(OCAMLMKLIB) $(INCFLAGS) $(CLIBFLAGS) \ -o $(CLIB_BASE) $(OBJ_LINK) $(CLIBS:%=-l%) \ --------------080703090406030905090002-- ------------------- 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