Browse thread
Controlling module loading order.
-
Guillaume Yziquel
- Stéphane Glondu
-
Gerd Stolpmann
- Guillaume Yziquel
[
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: | 2010-01-11 (17:49) |
From: | Guillaume Yziquel <guillaume.yziquel@c...> |
Subject: | Re: [Caml-list] Controlling module loading order. |
Gerd Stolpmann a écrit : > Hi Guillaume, > > if you want to control from findlib that a certain function is invoked, > the usual way to do it is to put a .cmo/.cmx file into the "archive" > variables. The problem is that the linker drops all unused modules > from .cma/.cmxa archives, and as a consequence the initialization code > of these modules is not executed. So you could make R.interpreter > a .cmo/.cmx - in this case the module is always initialized. Thank you so much! > The other workaround is to provide an init function in R.interpreter > like > > let init() = () > > By calling this function the user references the interpreter, and all > the initialization code is executed. That's exactly what I want to avoid. -- Guillaume Yziquel http://yziquel.homelinux.org/