caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@maxtal.com.au>
To: caml-list@inria.fr
Subject: Dynamic loading and building of shared libraries
Date: Sat, 15 Jan 2000 13:14:45 +1100	[thread overview]
Message-ID: <387FD815.6FF50F15@maxtal.com.au> (raw)
In-Reply-To: <20000113103240.36062@pauillac.inria.fr>

I have a need to load sets of ocaml functions at run time
in Viper using dlopen: this requirement arises from Python's
ability to dynamically load C extension modules: Viper
emulates this by loading text files which provide
equivalent functionality, but these files must use
native functions to provide the functionality.

At the moment, these functions must be statically
linked into the interpreter, which is not really acceptable.

It should be easy to provide a C factory function in a shared
library that returns a table of functions: my question is,
how to tell ocaml to link a shared library, rather than
a main executable.

How do I do this? If not, can a way be devised to tell
ocamlopt to do it? Or is there a reasone it isn't possible?

-- 
John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
homepage: http://www.maxtal.com.au/~skaller
download: ftp://ftp.cs.usyd.edu/au/jskaller




  reply	other threads:[~2000-01-16 21:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-29  9:41 Threads Library David McClain
2000-01-13  9:32 ` Xavier Leroy
2000-01-15  2:14   ` skaller [this message]
2000-01-17  3:59     ` Dynamic loading and building of shared libraries Ian Zimmerman
2000-01-17  8:00     ` STARYNKEVITCH Basile

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=387FD815.6FF50F15@maxtal.com.au \
    --to=skaller@maxtal.com.au \
    --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).