From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 48B3C7ED5C for ; Fri, 3 Aug 2012 01:55:25 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jeannin@cs.cornell.edu) identity=pra; client-ip=128.84.103.138; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="jeannin@cs.cornell.edu"; x-sender="jeannin@cs.cornell.edu"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jeannin@cs.cornell.edu) identity=mailfrom; client-ip=128.84.103.138; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="jeannin@cs.cornell.edu"; x-sender="jeannin@cs.cornell.edu"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@exch-hub1.cs.cornell.edu) identity=helo; client-ip=128.84.103.138; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="jeannin@cs.cornell.edu"; x-sender="postmaster@exch-hub1.cs.cornell.edu"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AloCAM0SG1CAVGeKe2dsb2JhbABFuT8BARYmBSKCIj1APRYYAwIBAgFLDQgBAYgJm1WYbIkEjzKDHAOIGJMKjS0 X-IronPort-AV: E=Sophos;i="4.77,704,1336341600"; d="scan'208";a="152331606" Received: from mail-hub-1.cs.cornell.edu (HELO exch-hub1.cs.cornell.edu) ([128.84.103.138]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-MD5; 03 Aug 2012 01:55:23 +0200 Received: from [128.84.98.107] (128.84.98.107) by mail.cs.cornell.edu (128.84.103.140) with Microsoft SMTP Server (TLS) id 8.3.245.1; Thu, 2 Aug 2012 19:55:21 -0400 Message-ID: <501B1370.2090409@cs.cornell.edu> Date: Thu, 2 Aug 2012 19:55:28 -0400 From: Jean-Baptiste Jeannin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Subject: [Caml-list] Compiling a file using the Toploop module Hi all, I have been using the Toploop module in some code that I have always interpreted using the "ocaml" command. I am now trying to compile this code using "ocamlc", but I keep getting the following error: File "try_toploop.ml", line 1, characters 0-1: Error: Error while linking try_toploop.cmo: Reference to undefined global `Toploop' More precisely, this error can be reproduced with a file try_toploop.ml containing just the two lines: module T = Toploop;; print_int 0;; It interprets fine with the ocaml interpreter (or as a matter of fact, in the toplevel system): $ ocaml try_toploop.ml 0 However, if I try to compile it, I get: $ ocamlc try_toploop.ml File "try_toploop.ml", line 1, characters 0-1: Error: Error while linking try_toploop.cmo: Reference to undefined global `Toploop' I am wondering how to compile such a file using ocamlc, or even if it is possible. I have been looking for possible options to include a pointer to a toploop.cmo, but could not solve the problem. Thank you for your help! Jean-Baptiste Jeannin