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 IAA16162; Thu, 28 Nov 2002 08:40:52 +0100 (MET) 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 IAA16032 for ; Thu, 28 Nov 2002 08:40:50 +0100 (MET) Received: from hermes.sc.intel.com (fmr03.intel.com [143.183.121.5]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gAS7enX04733 for ; Thu, 28 Nov 2002 08:40:49 +0100 (MET) Received: from petasus.sc.intel.com (petasus.sc.intel.com [10.3.253.4]) by hermes.sc.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id gAS7dT516805 for ; Thu, 28 Nov 2002 07:39:29 GMT Received: from mipos2.intel.com (mipos2-seg48.sc.intel.com [143.183.48.42]) by petasus.sc.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.27 2002/10/16 23:46:59 dmccart Exp $) with ESMTP id gAS7e5o12739 for ; Thu, 28 Nov 2002 07:40:05 GMT Received: from zws707.sc.intel.com (zws707.sc.intel.com [143.183.38.79]) by mipos2.intel.com (8.11.6/8.11.6/MailSET/hub) with ESMTP id gAS7el823353; Wed, 27 Nov 2002 23:40:47 -0800 (PST) Received: (from ctchou@localhost) by zws707.sc.intel.com (8.8.6/8.8.6) id XAA03778; Wed, 27 Nov 2002 23:44:13 -0800 (PST) Date: Wed, 27 Nov 2002 23:44:13 -0800 (PST) Message-Id: <200211280744.XAA03778@zws707.sc.intel.com> X-Authentication-Warning: zws707.sc.intel.com: ctchou set sender to ctchou@mipos2.intel.com using -f From: Ching-Tsun Chou To: caml-list@inria.fr Subject: [Caml-list] An elementary question about ocamlmktop Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I'm sure this question of mine has a simple answer, but, alas, I couldn't figure it out myself after many trials! Suppose I have a subdirectory "zzz" under my home directory which contains a file "foo.ml" whose content is: $ cat zzz/foo.ml let hello () = Printf.printf "Hello, world!\n" where "$ " is the shell prompt. Now I do the following: $ cd zzz $ ocamlmktop foo.ml -o foo $ ./foo Objective Caml version 3.06 # Foo.hello () ;; Hello, world! - : unit = () So far, so good. But now I do the following: $ cd $ zzz/foo Objective Caml version 3.06 # Foo.hello () ;; Characters 0-9: Foo.hello () ;; ^^^^^^^^^ Unbound value Foo.hello I think the problem is that ocamlrun can't find "foo.cmi", since the same problem occurs even in "zzz" if "foo.cmi" is removed (removing "foo.cmo" apparently has no effect). However, if I do: $ zzz/foo -I ~/zzz Objective Caml version 3.06 # Foo.hello () ;; Hello, world! - : unit = () then everything works again (assuming "zzz/foo.cmi" is still there). My question is: Is there any way to generate a toplevel "foo" that contains the information in "foo.cmi", so that it can (so to speak) exists by itself? Many thanks in advance! - Ching Tsun ------------------- 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