Re: Error whith DynLink module

From: Xavier Leroy (Xavier.Leroy@inria.fr)
Date: Tue Mar 09 1999 - 15:42:48 MET


Date: Tue, 9 Mar 1999 15:42:48 +0100
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Hugues CASSE <casse@irit.fr>, CAML <caml-list@inria.fr>
Subject: Re: Error whith DynLink module
In-Reply-To: <36DE5A47.6E0C@irit.fr>; from Hugues CASSE on Thu, Mar 04, 1999 at 11:02:47AM +0100

> let load_prog name =
> Dynlink.init ();
> print_endline "OK !"; flush stdout;
> Dynlink.add_interfaces
> ["Syntax"]
> [...]
> with Dynlink.Error err ->
> print_endline (Dynlink.error_message err); false
>
> Zhen I execute the program, I get the following output...
>
> OK !
> KO !
> no implementation available for Digest
>
> Can somenody help me ?

What about adding "Digest" to your call to Dynlink.add_interfaces?

         Dynlink.add_interfaces ["Syntax"; "Digest"; ...] ...

Actually, you should add all standard library modules that the
dynamically-linked module might need, e.g. Pervasives, String, Char,
List, etc.

Yes, it is a pain to list them all, but for dynamic linking of
untrusted code in a secure environment (the initial application of
Dynlink), it must be done this way.

Hope this helps,

- Xavier Leroy



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:20 MET