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 JAA20468; Tue, 12 Nov 2002 09:27:33 +0100 (MET) 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 JAA20458 for ; Tue, 12 Nov 2002 09:27:23 +0100 (MET) Received: from c007.snv.cp.net (h015.c007.snv.cp.net [209.228.33.243]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id gAC8RL101915 for ; Tue, 12 Nov 2002 09:27:21 +0100 (MET) Received: (cpmta 14733 invoked from network); 11 Nov 2002 23:27:18 -0800 Received: from 65.187.194.217 (HELO localhost) by smtp.directvinternet.com (209.228.33.243) with SMTP; 11 Nov 2002 23:27:18 -0800 X-Sent: 12 Nov 2002 07:27:18 GMT Date: Tue, 12 Nov 2002 02:27:14 -0500 Mime-Version: 1.0 (Apple Message framework v482) Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: [Caml-list] custom toplevel under darwin From: jehenrik To: caml-list@inria.fr Content-Transfer-Encoding: 7bit Message-Id: <2A4CA3C7-F610-11D6-901A-00039375801A@yahoo.com> X-Mailer: Apple Mail (2.482) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Are custom toplevels supposed to work under darwin with ocaml 3.06? I have a simple .cpp file from the OReily book: inspect.c: #include #include extern "C" value inspect (value v) { if (Is_long(v)) printf ("integer (%ld) : %ld", (long) v, Long_val(v)); else if (Is_block(v)) printf ("v is a pointer"); else printf ("v is neither an integer nor a pointer (???)"); printf(" "); fflush(stdout) ; return v ; } and a simple .ml file, intro_runtime.ml: external inspect1 : 'a -> 'a = "inspect" ;; inspect1 123;; As a standalone program this works fine: ocamlc -custom inspect.o intro_runtime.ml -o intro_runtime # this works But this way of making a toplevel, along with all the variations I can think of, doesn't: ocamlmktop -custom inspect.o -o intro_runtime # external inspect1 : 'a -> 'a = "inspect" ;; external inspect1 : 'a -> 'a = "inspect" # inspect1;; The external function `inspect' is not available # inspect1 123;; The external function `inspect' is not available If this functionality is not ported, I would appreciate it if somebody could pass that on to me. Jeff Henrikson ------------------- 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