From: "SooHyoung Oh" <shoh@duonix.com>
To: "caml-list" <caml-list@inria.fr>
Subject: [Caml-list] library dynamic loading ?
Date: Wed, 12 Sep 2001 13:53:15 +0900 [thread overview]
Message-ID: <009201c13b46$d5ad2bd0$1e01a8c0@hama> (raw)
Hi!
Is it possible to load library dynamically?
Here are my trials; Did I miss something or is it impossible to load library
dynamically?
(1) First, I made toplevel system with unix library
$ ocamlmktop -o unixtop unix.cma
(2) GOOD!!!: It's OK to execute a script
$ cat fread
open Unix;;
let buffer = String.create 100 in
let fd = openfile "demo.txt" [O_RDONLY] 0 in
let n = read fd buffer 0 100 in
let err = write stdout buffer 0 n in
close fd;;
$ unixtop fread
Hello
(3) Fail 1: dynamic load of unix library
$ ocaml unix.cma fread
File "/usr/lib/ocaml/threads/unix.cma", line 1, characters 12-13:
Illegal character (\000)
(4) Fail 2: dynamic load of library
$ cat fread2
#load “unix.cma”;;
... (same as fread)
$ ocaml fread2
The external function `unix_read' is not available
--- SooHyoung Oh
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
next reply other threads:[~2001-09-12 4:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-12 4:53 SooHyoung Oh [this message]
2001-09-12 7:15 ` Sven
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='009201c13b46$d5ad2bd0$1e01a8c0@hama' \
--to=shoh@duonix.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;
as well as URLs for NNTP newsgroup(s).