Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: PCRE on Win32-VC (Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32)
>> On Sat, 17 Aug 2002 16:28:03 +0200, Gerd Stolpmann <> said:

Gerd> I don't know how to build PCRE for win32, but I would expect that it is
Gerd> doable.

It is possible, I have done, but currently some hacks are needed.

I compiled PCRE source by Visual C++ 6 using hand-written Makefile
(see the document named NON-UNIX-USE in PCRE distribution),
passed some additional build-option to the pcre-ocaml library.
It works, at least in my computer, with static linking.

Some of the problems I found are already solved and reported to
Markus. It is fixed in pcre-ocaml-4.28.2 (OCamlMakefile update).

One problem not solved is that OCamlMakefile pass the option
'--ccopt pcre' to ocamlc, and thus VC's linker searches the file pcre.obj,
not pcre.lib. I have an ad-hoc solution to this problem,
but I don't know whether it is correct or not.
Once I find the correct answer, I'll report it.

# A Question:
# In what pathname should I place the native PCRE library?
# Name "pcre.lib"? "libpcre.lib"?
# Path "$(OCAMLLIBDIR)/contrib"? or "/winnt/system32" or whatever?
# Or should it be merged into "libpcre_stubs.lib"?

## Does someone have a good knowledge of dynamic linking in Win32?
## I have almost no knowledge of it.

Yutaka Oiwa              Yonezawa Lab., Dept. of Computer Science,
      Graduate School of Information Sci. & Tech., Univ. of Tokyo.
      <>, <>
PGP fingerprint = C9 8D 5C B8 86 ED D8 07  EA 59 34 D8 F4 65 53 61
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: