From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA16394; Thu, 6 Sep 2001 21:53:26 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA16363 for ; Thu, 6 Sep 2001 21:53:25 +0200 (MET DST) Received: from stb-mail-01.adept.za.net (stb-mail-01.adept.za.net [64.245.11.2]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f86JrIr10115 for ; Thu, 6 Sep 2001 21:53:19 +0200 (MET DST) Received: from spyker (p91.dialup-01.adept.za.net [64.245.12.91]) by stb-mail-01.adept.za.net (Postfix) with ESMTP id 86F1B1FF52 for ; Thu, 6 Sep 2001 21:53:12 +0200 (SAST) Received: from js by spyker with local (Exim 3.12 #1 (Debian)) id 15f5Bu-0004aH-00 for ; Thu, 06 Sep 2001 21:51:58 +0200 To: ocaml Subject: Re: [Caml-list] How to use pcre (3) References: <87pu94lbdt.fsf@bywoner.sun.ac.za> <20010906152958.B24260@chopin.ai.univie.ac.at> <87sne0jt71.fsf_-_@bywoner.sun.ac.za> <20010906164530.F24260@chopin.ai.univie.ac.at> From: Johann Spies Date: 06 Sep 2001 21:51:58 +0200 In-Reply-To: Markus Mottl's message of "Thu, 6 Sep 2001 16:45:30 +0200" Message-ID: <87heug5c81.fsf_-_@adept.co.za> User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Markus Mottl writes: > This is an FAQ and not related to the Pcre in particular: the problem > is that Maybe a FAQ, but difficult for newbies to know when and how. > > a) you have to build a "customized" toplevel, because a C-library > has to be linked in. This is very easy: After a bit of experimentation I got this to work. After about another hour and a half I did not succeed in compiling the following program: ------------------------- let s = "abcde";; let t = Pcre.replace ~pat:"c" ~templ:" Hier gebeur 'n ding " s;; print_string t;; print_newline();; -------------------------- I have read the man page for ocamlopt as well as the ocaml manual and still do not know how to compile it!? Maybe I am just dumb. My latest effort was: $ocamlfind ocamlopt -o rex -I /usr/lib/ocaml/contrib -ccopt -L/usr/lib/ocaml/contrib -cclib -llibpcre.a -linkall /tmp/rex.ml No implementations provided for the following modules: Pcre referenced from /tmp/rex.cmx The usage of ocamlfind made no difference. Johann -- J.H. Spies - Tel. 082 782 0336 / 021-808 4036(w) Posbus 4668, Tygervallei 7536 "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