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 DAA07511; Fri, 15 Aug 2003 03:35:16 +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 DAA27209 for ; Fri, 15 Aug 2003 03:35:15 +0200 (MET DST) Received: from remt30.cluster1.charter.net (remt30.cluster1.charter.net [209.225.8.40]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h7F1ZBT28697 for ; Fri, 15 Aug 2003 03:35:14 +0200 (MET DST) Received: from [68.113.10.87] (HELO 1969.ws) by remt30.cluster1.charter.net (CommuniGate Pro SMTP 4.0.6) with ESMTP id 120720037 for caml-list@inria.fr; Thu, 14 Aug 2003 21:35:09 -0400 Message-ID: <3F3C396B.8020009@1969.ws> Date: Thu, 14 Aug 2003 18:37:47 -0700 From: Karl Zilles Organization: 1969 Communications, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: [Caml-list] custom toplevel runs script with #use, but not from command line: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; cygwin:01 netstring:01 optimised:01 ocamlfind:01 ocamlmktop:01 -predicates:01 -linkpkg:01 netchannels:01 endline:01 3.06:01 non-trivial:01 invocations:01 -package:01 caml:01 bytecode:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I'm running under cygwin, and using the netstring package. It seems to be working find, I can compile bytecode and optimised programs with it using ocamlfind. I've tried to create a custom toplevel to run scripts through: ocamlfind ocamlmktop -package netstring -predicates netstring_minimum -linkpkg -o nettop generates nettop.exe. test.ml: ----------------------------------- open Netchannels;; print_endline "Hello World!";; ----------------------------------- When I run the toplevel with the script on the command line, it can't find the Netchannels module: $ ./nettop test.ml File "test.ml", line 1, characters 0-16: Unbound module Netchannels When I run from inside the toplevel using #use, it works: $ ./nettop Objective Caml version 3.06 # #use "test.ml";; Hello World! - : unit = () Even non-trivial programs work correctly this way. I thought that these two invocations should be equivalent. Why does one work, but not the other? ------------------- 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