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 SAA04105; Thu, 17 Oct 2002 18:09:00 +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 SAA03734 for ; Thu, 17 Oct 2002 18:08:59 +0200 (MET DST) Received: from cantina.students.cs.unibo.it (cantina.students.cs.unibo.it [130.136.3.110]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9HG8wD15157 for ; Thu, 17 Oct 2002 18:08:58 +0200 (MET DST) Received: from lordsoth.takhisis.org ([130.136.33.14]) (authenticated bits=0) by cantina.students.cs.unibo.it (8.12.4/8.12.4/Debian-2) with ESMTP id g9HG8rko003689 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for ; Thu, 17 Oct 2002 18:08:56 +0200 Received: from lordsoth.takhisis.org (lordsoth.takhisis.org [127.0.0.1]) by lordsoth.takhisis.org (8.12.6/8.12.6/Debian-6) with ESMTP id g9HG8bRA029776 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 17 Oct 2002 18:08:37 +0200 Received: (from zack@localhost) by lordsoth.takhisis.org (8.12.6/8.12.6/Debian-6) id g9HG8bxJ029774 for caml-list@inria.fr; Thu, 17 Oct 2002 18:08:37 +0200 Date: Thu, 17 Oct 2002 18:08:37 +0200 From: Stefano Zacchiroli To: Inria Ocaml Mailing List Subject: [Caml-list] [camlp4] compiling against Pcaml module Message-ID: <20021017160837.GA29662@cs.unibo.it> Mail-Followup-To: Inria Ocaml Mailing List Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I'm trying to play with ocaml sources abstract syntax tree, but I'm unable to compile against Pcaml module. As camlp4 reference manual report at the beginning of chapter 8: When linking an application using this library modules, you have to add the file gramlib.cma in the command line. For example, with the line: ocamlc -I +camlp4 gramlib.cma This seems to work with modules from camlp4 library modules other that Pcaml (try for example with Fstream or Stdpp). As an example I've tried to build the following source file: (* bar.ml *) let ast = !Pcaml.parse_interf (Stream.of_channel (open_in "foo.mli")) in print_endline "foo" with the following command: ocamlc -o bar -I +camlp4 gramlib.cma bar.ml and I get: Error while linking ast_prova.cmo: Reference to undefined global `Pcaml' I've also digged into /camlp4/gramlib.a with 'nm' and indeed I found no symbols starting with "Pcaml" string. Unfortunately the stdlib directory contains also no pcaml.cmo object .. What I've to link additionally to gramlib.cma in order to use "Pcaml" module? BTW, is probably better also to correct the camlp4 manual with the appropriate compile line, if I haven't missed something though. TIA, Cheers. -- Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy zack@cs.unibo.it | ICQ# 33538863 | http://www.cs.unibo.it/~zacchiro "I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant!" -- G.Romney ------------------- 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