Browse thread
Dynamic loading of native code : what about librairies and packs ?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Pierre-Loïc_Garoche <Pierre-Loic.Garoche@o...> |
| Subject: | Dynamic loading of native code : what about librairies and packs ? |
I am discovering this feature of loading dynamically native code. The Frama-C framework (www.frama-c.cea.fr) provides now a plugin architecture that allows you to develop your own plugin and loads it directly in the framework. I targeted to adapt a simple tool I developped as a Frama-C plugin and faced some difficulties. I did not found enough information about the compilation of cmxs files. ** First: what about external libraries ? Could you detail the behavior of the linking process of cmxs file with respect to dependancies. If I understand well any library used to compile cmx files should be - either know by the software dynamically loading the plugin, - or its cmxa should be passed as argument of ocamlopt -shared command. But what is the difference between: ocamlopt.opt -shared mylib.cmxa xxx.cmx yyy.cmx -o target.cmxs and ocamlopt.opt -shared -linkall mylib.cmxa xxx.cmx yyy.cmx -o target.cmxs Both seems to work similarly on my example (no differences between resulting files). ** Second: how about packs ? Does the option "-shared -o target.cmxs" is similar to "-pack -o target.cmx", without the dynamic loading thing ? And what if the plugin components (cmx files) are or are not compiled with the "-for-pack" option ? Any information would be greatly appreciated. Best regards, pl -- Pierre-Loïc Garoche pierre-loic.garoche@onera.fr http://www.onera.fr/staff/pierre-loic-garoche/