caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Eugene Kotlyarov <ekot@narod.ru>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Building PCRE-OCaml on Win32
Date: Sat, 15 May 2004 16:31:10 +0400	[thread overview]
Message-ID: <40A60D8E.9030108@narod.ru> (raw)
In-Reply-To: <40A12CF0.2070406@lophty.com>

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

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.



[-- Attachment #2: OCamlMakefile.diff --]
[-- Type: text/plain, Size: 1106 bytes --]

--- 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%) \



  parent reply	other threads:[~2004-05-15 12:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-11 19:43 brian donovan
2004-05-12 17:25 ` Markus Mottl
2004-05-15 12:31 ` Eugene Kotlyarov [this message]
2004-05-13 22:32 HENRIKSON, JEFFREY
2005-10-27 19:54 Roger Levy
2005-10-27 19:58 ` [Caml-list] " Gerd Stolpmann
2005-10-27 20:06   ` Roger Levy
2005-10-27 20:16 ` Peter Jolly
2005-10-27 21:30   ` Roger Levy
2005-11-08  2:44   ` Igor Pechtchanski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40A60D8E.9030108@narod.ru \
    --to=ekot@narod.ru \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).