Le mercredi 14 septembre 2011 à 18:03 +0200, Romain Bardou a écrit : 
> > $ ocamlmklib -ldopt -shared wrapper.o mylib.cmx -o mylib
> 
> I tried and I still get the same "invalid ELF header" message.
> 
> I also tried :
>       ocamlmklib -ocamlopt "ocamlopt -shared"
> but then ocamlopt complains that it has been called with too many -a, 
> -shared, ... arguments.

cmxa cannot be loaded dynamically, you need to create a cmxs from the
cmxa with the following command:

  ocamlopt -shared -linkall foo.cmxa -o foo.cmxs

and then load the cmxs dynamically with Dynlink.

-- 
Jérémie



-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to