From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Yves Bertot <Yves.Bertot@sophia.inria.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Tutorial example for nat dynlink
Date: Wed, 26 Nov 2008 15:34:39 +0100 [thread overview]
Message-ID: <492D5E7F.9050909@inria.fr> (raw)
In-Reply-To: <492D5B8D.8050404@sophia.inria.fr>
Hello Yves,
> I have been trying to build a small example "hello world" program
> using native dynlink, but I don't manage to make it work. Could
> please send me some advice?
The issue here is that when Dynlink.loadfile is called, module Toto is
not yet completely evaluated, therefore it is not yet visible to
dynamically-loaded code. The solution is just to split your main
program in two modules: Toto containing what your plugin needs to see,
and Totomain performing the dynlink. Then, it'll work just fine.
Cheers,
- Xavier
prev parent reply other threads:[~2008-11-26 14:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-26 14:22 Yves Bertot
2008-11-26 14:34 ` Xavier Leroy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=492D5E7F.9050909@inria.fr \
--to=xavier.leroy@inria.fr \
--cc=Yves.Bertot@sophia.inria.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).