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 MAA04944; Wed, 8 Aug 2001 12:11:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA05041 for ; Wed, 8 Aug 2001 12:11:03 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f78AB2D21357 for ; Wed, 8 Aug 2001 12:11:03 +0200 (MET DST) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id f78AB2m19765 ; Wed, 8 Aug 2001 12:11:02 +0200 (CEST) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.9.2/jb-1.1) id MAA16986 ; Wed, 8 Aug 2001 12:11:02 +0200 (MET DST) Date: Wed, 8 Aug 2001 12:11:02 +0200 (MET DST) From: Alain Frisch To: Johann Spies cc: ocaml mailing list Subject: Re: [Caml-list] How to install a package In-Reply-To: <87y9oude5k.fsf@bywoner.sun.ac.za> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On 8 Aug 2001, Johann Spies wrote: > I have followed the instructions for installing libpq_ocaml. (libpq_ocaml is no longer maintained; you may want to install Postgres instead (safer interface, more examples); I will give instructions for it) > But how can I use libpq in the toplevel? As the package contains C objects, you have to build a custom toplevel: ocamlfind ocamlmktop -o postgres_top -linkpkg -package postgres You also have to pass to this toplevel the directory where it can find the .cmi files for the package (is there a reason for ocamlmktop not putting the -I options in the custom toplevel ?): ./postgres_top -I `ocamlfind query postgres` Objective Caml version 3.01 # let c = new Postgres.connection "host=clipper";; val c : Postgres.connection = # c # user;; - : string = "frisch" Hope this helps. -- Alain ------------------- 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