Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
compiling ocaml into a shared object
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Hendrik Tews <H.Tews@c...>
Subject: compiling ocaml into a shared object

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: 

I tried 

  ocamlopt -output-obj -o 

but on 

  dlopen ("/home/tews/src/ocaml/", RTLD_LAZY);

I get 

  dlopen error: /home/tews/src/ocaml/ 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!