From: jehenrik <jehenrik@yahoo.com>
To: caml-list@inria.fr
Subject: [Caml-list] custom toplevel under darwin
Date: Tue, 12 Nov 2002 02:27:14 -0500 [thread overview]
Message-ID: <2A4CA3C7-F610-11D6-901A-00039375801A@yahoo.com> (raw)
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 <stdio.h>
#include <caml/mlvalues.h>
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
next reply other threads:[~2002-11-12 8:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-12 7:27 jehenrik [this message]
2002-11-12 9:17 ` Lex Stein
2002-11-12 12:44 ` jehenrik
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=2A4CA3C7-F610-11D6-901A-00039375801A@yahoo.com \
--to=jehenrik@yahoo.com \
--cc=caml-list@inria.fr \
/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