Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] How to use pcre
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Johann Spies <jspies@m...>
Subject: Re: [Caml-list] How to use pcre (2)
I suspect there is something wrong with my installation.  I have
compiled pcre in /usr/local/src and put the following files in
/usr/local/lib/ocaml:

libpcre.a
pcre.a
pcre.cma
pcre.cmi
pcre.cmxa
pcre.mli

Working on Debian Linux, that did not work.  So I symlinked all those
files to /usr/lib/ocaml.  Then I could open pcre in the toplevel.  But
there is something else wrong here.

Trying Markus' solution I came across the following new problem
regarding pcre both in the toplevel and when I try to compile it:

-------------------------
$ ocaml
        Objective Caml version 3.01

# let s = "abcde";;
let s = "abcde";;
val s : string = "abcde"
# let t = Pcre.replace ~pat:"d" ~templ:"D" s;;
let t = Pcre.replace ~pat:"d" ~templ:"D" s;;
Reference to undefined global `Pcre'

---------------------
$ ocaml
        Objective Caml version 3.01

# open Pcre;;
open Pcre;;
# let s = "abcde";;
let s = "abcde";;
val s : string = "abcde"
#   let t = replace ~pat:"d" ~templ:"D" s;;
  let t = replace ~pat:"d" ~templ:"D" s;;
Reference to undefined global `Pcre'
----------------------------------

I tried to compile the file in which I want to use this type of
function with

ocamlfind ocamlopt -o v1 -package postgres,threads -thread -linkpkg
v3.ml
-------------
No implementations provided for the following modules:
  Pcre referenced from v3.cmx
------------
and also with 
ocamlfind ocamlopt -o v1 -package postgres,pcre,threads -thread
-linkpkg v3.ml
-----------
ocamlfind: package 'pcre' not found
------------
There was no META file in the pcre-sources. How do I go forward from
here? 


Johann
-- 
Johann Spies          Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch

     "Behold, I stand at the door, and knock; if any man 
      hear my voice, and open the door, I will come in to 
      him, and will sup with him, and he with me."       
                                   Revelation 3:20 
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr