Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] compiling PXP , OCAMLNET AND PCRE to win32
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Yutaka OIWA <oiwa@y...>
Subject: Re: PCRE on Win32-VC (Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32)
I've created a (possibly incomplete) binary snapshot of 
the pcre-ocaml-4.28.2 for Win32-MSVC, because there is a request for it.

http://www.yl.is.s.u-tokyo.ac.jp/~oiwa/pub/caml/pcre-ocaml-4.28.2-windows.tar.gz

* Known problem:

Currently, MSVC's LINK warns about some import symbol problems.
I did not find the reason yet (I'm not a Win32 expert.)

* To Use A Binary:

  Copy pcre.lib to somewhere the MSVC linker searches for libraries (or simply in ".").
  Place libpcre-stubs.lib and other ocaml-related files to some directory and
  pass an appropriate -I options to ocamlc/ocamlopt.
  I have only tested it with -threads option.

  If you want to place the file pcre.lib to somewhere outside default MSVC
  search path, pass options "--ccopt /LINK --ccopt /LIBPATH:somewhere" to ocamlc.

* Build From Sources:

Note:
Those files are just picked up by hand from my working directory.
So some required files may be missing, or some files may not be useful.
I have actually not tried the following "stand-alone" build process.
Sorry, but please hack it if it does not work well ;-)

  Source file archives for PCRE-3.9 and pcre-ocaml-4.28.2 are needed.

  The files in the directory "pcre-files" are hand-written Makefile and
  hand-configured pcre header files.
  (on Unix platform, they are automatically generated by configure.)

  Untar pcre-3.9.tar.gz,
  modify my version of Makefile appropriately (include path),
  then use cygwin's make utility to build "pcre.lib" by command line
  "make -f path/to/my/Makefile" in the pcre-3.9 directory.

  Untar pcre-ocaml-4.28.2.tar.gz, then a command

  make all opt STATIC=yes CFLAGS=-Ipath/to/pcre-files LIBS= LIBDIRS= THREADS=yes CLIBS=pcre.lib

  (hopefully :-) builds pcre-ocaml library.
  Note that pcre-ocaml's build process makes the file named
  "pcre.lib". Obviously its content is pcre-ocaml, not PCRE-C.
  Please don't confuse those two files.

-- 
Yutaka Oiwa              Yonezawa Lab., Dept. of Computer Science,
      Graduate School of Information Sci. & Tech., Univ. of Tokyo.
      <oiwa@yl.is.s.u-tokyo.ac.jp>, <yutaka@oiwa.shibuya.tokyo.jp>
PGP fingerprint = C9 8D 5C B8 86 ED D8 07  EA 59 34 D8 F4 65 53 61
-------------------
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