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] darwin link suckage eg: pcre
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <markus@o...>
Subject: Re: [Caml-list] darwin link suckage eg: pcre
On Sat, 14 Dec 2002, jehenrik wrote:
> >bash2.05 jehenrik@localhost ~/src/pcre-ocaml-4.28.3 % ocaml_pcre
> >        Objective Caml version 3.06
> >
> ># open Pcre;;
> >Unbound module Pcre
> ># Pcre.regexp;;
> >Unbound value Pcre.regexp

Toplevels always require include paths, i.e. you should either start it
as follows:

  ocaml_pcre -I +contrib

Or as usual but include the path within the toplevel:

  # #directory "+contrib";;

> ># #load "lib/pcre.cmo";;
> ># Pcre;;
> >Unbound constructor Pcre

This wouldn't work anyway, because here Pcre is not interpreted as
a module name but as a constructor. You either need to "open Pcre" or
access one of the names contained within it with a fully qualified name,
e.g. "Pcre.regexp". Even then the above example wouldn't work, because
the compiled interface file "pcre.cmi" also needs to be visible. This
can only be done in the way explained above.

> Of course this isn't what I want, it's just duct tape.  Now I have a fix 
> which I don't understand either.  I change
> >JH was $(OCAMLLIBPATH)/contrib
> in OcamlMakefile, reinstall, and everything works perfect:

Sure, because the standard directory is always in the search path of

Markus Mottl

Markus Mottl                                   
Austrian Research Institute
for Artificial Intelligence        
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: