caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] [camlp4] compiling against Pcaml module
Date: Thu, 17 Oct 2002 18:21:25 +0200	[thread overview]
Message-ID: <20021017182125.E32600@verdot.inria.fr> (raw)
In-Reply-To: <20021017160837.GA29662@cs.unibo.it>; from zack@cs.unibo.it on Thu, Oct 17, 2002 at 06:08:37PM +0200

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


  reply	other threads:[~2002-10-17 16:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-17 16:08 Stefano Zacchiroli
2002-10-17 16:21 ` Daniel de Rauglaudre [this message]
2002-10-17 16:23   ` Daniel de Rauglaudre
2002-10-17 16:22 ` Samuel Lacas
2002-10-17 16:26   ` Daniel de Rauglaudre
2002-10-17 16:28     ` [Caml-list] a quick question on camlp4 Alexander V.Voinov
2002-10-17 16:55       ` Daniel de Rauglaudre
2002-10-17 17:07         ` Alexander V.Voinov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021017182125.E32600@verdot.inria.fr \
    --to=daniel.de_rauglaudre@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).