caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Hendrik Tews <H.Tews@cs.ru.nl>
To: caml-list@inria.fr
Subject: compiling ocaml into a shared object
Date: Thu, 14 Dec 2006 14:10:31 +0100	[thread overview]
Message-ID: <17793.19783.551299.652755@tandem.cs.ru.nl> (raw)

Hi,

could somebody tell me how to compile ocaml sources into a shared
object that can be loaded with dlopen? The following message
seems to tell me that this is possible:
http://caml.inria.fr/pub/ml-archives/caml-list/2001/12/e2092b52999522eaa0bbc099b07cf4e1.en.html 

I tried 

  ocamlopt -output-obj -o ocaml-dlex.so dlex.ml 

but on 

  dlopen ("/home/tews/src/ocaml/ocaml-dlex.so", RTLD_LAZY);

I get 

  dlopen error: /home/tews/src/ocaml/ocaml-dlex.so: only ET_DYN and ET_EXEC can be loaded


Passing -ccopt -shared to ocamlopt changed nothing. In fact it
seems that -output-obj discards all -ccopt options!


Bye,

Hendrik


             reply	other threads:[~2006-12-14 13:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-14 13:10 Hendrik Tews [this message]
2006-12-14 13:24 ` [Caml-list] " Richard Jones
2006-12-15  5:29 oleg

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=17793.19783.551299.652755@tandem.cs.ru.nl \
    --to=h.tews@cs.ru.nl \
    --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).