On 09/14/2011 06:42 PM, Romain Bardou wrote: >>> Thanks, this solves the "native" part of my problem ! Now I need to >>> figure out how to link this .so file. >> >> You mean, the equivalent of dllmylib.so? There is no such file in native >> code: mylib.cmxs will contain the contents of mylib.cmxa and wrapper.o. > > No I mean the driver DLL for which Mylib is the binding. File > dllmylib.so is linked correctly, but binding.c includes api.h, which is > implemented in api.so, so I need to link with api.so as well. The whole > point of my original question is: how can I design the program such that > this api.so is loaded dynamically, because the user may want to choose a > different driver everytime, or even change driver during execution.
That would be a -cclib option passed to ocamlmklib. It embeds a -lXXX option in the .cmxa that should be visible with a recent version of ocamlobjinfo. You can check the result by running ldd on the .cmxs file. Cheers, -- Stéphane -- 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
