WARNING: This server is unstable and will be retired in the next days.
If you want to keep this forum available, please request immediately a migration
on the Nabble Support forum.
Forums that don't receive any migration request will be deleted forever.
> On 27 févr. 2012, at 16:43, Damien Doligez wrote:
>>> Also, when running why3, I get some undefined symbols (_camlRandom, _camlParsing, _camlString). Where are these symbols defined?
>> Looks like modules of the standard library, right ?
> Regarding this, should something special be done when dynlinking a file that depends on the standard library? I assume that dependencies are not automatically loaded, but should one load the standard library first?
> In other words, is this a bug in why3, or in ocaml?
Trying to get to the bottom of this, here is what I've done.
- Adapting the minimal example from http://caml.inria.fr/mantis/view.php?id=5093 I checked that I can load a plugin that uses a function from Random.
- I then tried to load a why3 plugin. It fails because it cannot find some symbol (_camlWhy3), and I could not find how to compile things to make sure why3.cmxa is linked with the plugin.
- Getting back to the basics, I tried to create a small archive of my own, which I would use in a plugin, and this is where I'm stuck. I have the following files:
let f () = "foo"
let s = Test.f ()
let () = print_endline s
let load f =
with Dynlink.Error e -> print_endline (Dynlink.error_message e)
let () = load "plugin.cmxs"
to build everything, I do (I tried adding test.cmxa everywhere, to no avail. Everything lives in the same, current directory):