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 SAA04723; Thu, 17 Oct 2002 18:21: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 SAA03245 for ; Thu, 17 Oct 2002 18:21:26 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9HGLP513048 for ; Thu, 17 Oct 2002 18:21:25 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id SAA05421 for caml-list@inria.fr; Thu, 17 Oct 2002 18:21:25 +0200 Date: Thu, 17 Oct 2002 18:21:25 +0200 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] [camlp4] compiling against Pcaml module Message-ID: <20021017182125.E32600@verdot.inria.fr> References: <20021017160837.GA29662@cs.unibo.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20021017160837.GA29662@cs.unibo.it>; from zack@cs.unibo.it on Thu, Oct 17, 2002 at 06:08:37PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Thu, Oct 17, 2002 at 06:08:37PM +0200, Stefano Zacchiroli wrote: > ocamlc -o bar -I +camlp4 gramlib.cma bar.ml > and I get: > Error while linking ast_prova.cmo: Reference to undefined global `Pcaml' The gramlib.cma of Camlp4 is just if you use Camlp4 to make grammars of your language, i.e. an alternative to ocamlyacc. If you write a program using the module Pcaml, i.e. if it is about the specific grammar of OCaml, you need to use the library camlp4.cma. But! You need also to specify which syntax you want. For the normal syntax, add "pa_o.cmo", for the revised syntax "pa_r.cmo", and for the Scheme syntax "pa_scheme.cmo". If your file "foo.mli" of your example is written in normal syntax, just compile your bar.ml like this: ocamlc -o bar -I +camlp4 camlp4.cma pa_r.cmo bar.ml -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners