caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Jérémie Dimino" <jeremie@dimino.org>
To: Jean-Baptiste Jeannin <jeannin@cs.cornell.edu>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Exception Typetexp.Error(_, _) when using Toploop
Date: Sat, 11 Aug 2012 10:34:35 +0200	[thread overview]
Message-ID: <20120811103435.3362ceec@locris.home> (raw)
In-Reply-To: <50257D72.2090607@cs.cornell.edu>

Le Fri, 10 Aug 2012 17:30:26 -0400,
Jean-Baptiste Jeannin <jeannin@cs.cornell.edu> a écrit :

> $ cd ..
> $ ocamlc -o prog.exe -I subdir toplevellib.cma subdir/tree.ml prog.ml
> $ ./prog.exe
> Fatal error: exception Typetexp.Error(_, _)

It is because it cannot find the interface for the module Tree (which
is contained in the file tree.cmi). If you want to compile code at
runtime using compiler libraries you need all .cmi for all units you
are using in this code.

You can add new search paths using Topdirs.dir_directory, which
correspond to the #directory directive in the toplevel.

Cheers,

-- 
Jérémie

  parent reply	other threads:[~2012-08-11  8:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10 21:30 Jean-Baptiste Jeannin
2012-08-11  0:14 ` [Caml-list] " Hongbo Zhang
2012-08-11 20:03   ` [Caml-list] " Jean-Baptiste Jeannin
2012-08-11  8:34 ` Jérémie Dimino [this message]
2012-08-11 20:15   ` [Caml-list] " Jean-Baptiste Jeannin

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=20120811103435.3362ceec@locris.home \
    --to=jeremie@dimino.org \
    --cc=caml-list@inria.fr \
    --cc=jeannin@cs.cornell.edu \
    /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).