This makefile currently builds pcre-ocaml on mingw for "dynlinked" bytecode compilation. I could not get a working native code build. I think there is an uncorrected problem in Ocaml in this direction. The common failure is to get a compiled, linked executable that crashes before running the first line of Ocaml code. I complained about this on caml-list (not very well) and didn't get an answer. If I have some time, I'll refine those complaints. Yes, you must build pcre by yourself if you don't want to depend on the cygwin runtime. You're on your own with depending on cygwin, as I have heard mixing cygwin and mingw C runtimes can produce very hard to diagnose bad problems. I will also paste here a shell script for compiling pcre sans cygwin. There's also a code generation command that you have to run, (to generate maketables.c?) but it's easy enough to figure out. Jeff Henrikson Pcre-4.4: gcc -mno-cygwin -DPOSIX_MALLOC_THRESHOLD=10 -c pcre.c gcc -mno-cygwin -DPOSIX_MALLOC_THRESHOLD=10 -c maketables.c gcc -mno-cygwin -DPOSIX_MALLOC_THRESHOLD=10 -c get.c gcc -mno-cygwin -DPOSIX_MALLOC_THRESHOLD=10 -c study.c gcc -shared -mno-cygwin pcre.o maketables.o get.o study.o -o libpcre-mingw.dll - Wl,--out-implib,libpcre-mingw.dll.a -----Original Message----- From: Jeff Henrikson [mailto:jehenrik@yahoo.com] Sent: Wednesday, May 12, 2004 1:31 PM To: brian donovan Subject: Re: PCRE-OCaml for OCaml 3.0.7 (MinGW) on Win32 Hi, Yes there are some issues with building pcre-ocaml on mingw. I didn't know about them all when I submitted that patch. I actually believe there are problems with ocaml itself on mingw, specifically with regard to linking C code. I have had identical problems in my other C modules too, unique to mingw. Sorry but I am not at work today, where my pcre-ocaml build lives. I can send you my current makefile tomorrow. Not all the things one would like to do work in this ocaml release under mingw. There are some super freaky things like building excutables that crash before running a line of code and such. I asked some imprecise questions about them on the list a while back, but didn't get answered. This was all for ocaml-3.07. I have not taken the time to ask them more precisely. Right now I believe I limit myself to building a bytecode "dynlinked" dll. I think that first makefile I sent out didn't even have -mno-cygwin in it. Use it. Apologies. Jeff Henrikson +++ brian donovan [11/05/04 21:25 +0800]: > Hello, > > I'm attempting to get PCRE-OCaml 5.0.8 working on a WinXP system on > which I've installed Cygwin (all packages) and the MinGW port of OCaml > 3.0.7 (precompiled w/installer). Findlib/OCamlfind 1.0.4 is already > installed. > > I've encountered some difficulties in getting PCRE-OCaml 5.0.8 going > and found your email in the header of a MinGW-based makefile included > in the package. While I can see that it's been many months since Markus > Mottl included your makefile w/his work (predating the release of OCaml > 3.0.7 it seems), I'm emailing in the hope that you're still working with > OCaml on Win32 and can advise me on building PCRE-OCaml. > > I'd be grateful for any guidance thatyou can give. > > Thanks, > brian donovan --