From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 814C5BC37 for ; Fri, 15 Jan 2010 18:32:08 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtsBANc1UEtV2gB5mWdsb2JhbACDX4wJjBoBAQEBAQgLCgcTr0eNeoEsgi9WBIk4 X-IronPort-AV: E=Sophos;i="4.49,282,1262559600"; d="scan'208";a="54102455" Received: from emailfrontal2.citycable.ch ([85.218.0.121]) by mail4-smtp-sop.national.inria.fr with SMTP; 15 Jan 2010 18:31:49 +0100 Received: from [192.168.0.12] (unknown [85.218.92.99]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal2.citycable.ch (Postfix) with ESMTPA id 84D4BB104DA; Fri, 15 Jan 2010 18:31:34 +0100 (CET) Message-ID: <4B50A677.3030302@citycable.ch> Date: Fri, 15 Jan 2010 18:31:35 +0100 From: Guillaume Yziquel Reply-To: guillaume.yziquel@citycable.ch User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 Cc: Gerd Stolpmann , OCaml List Subject: Re: [Caml-list] Controlling module loading order. References: <4B479BA3.6060300@citycable.ch> <1263211171.17350.7.camel@flake.lan.gerd-stolpmann.de> <4B4B6498.3050407@citycable.ch> In-Reply-To: <4B4B6498.3050407@citycable.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; guillaume:01 guillaume:01 gerd:01 stolpmann:01 findlib:01 cmo:01 cmx:01 cmxa:01 cmo:01 cmx:01 initialized:01 caml-list:01 cma:01 cma:01 modules:02 Guillaume Yziquel a =C3=A9crit : > Gerd Stolpmann a =C3=A9crit : >> 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. >=20 > Thank you so much! Just a complementary remark: when using a .cmo instead of a .cma, one=20 should ship a .o file in place of the .a file. For the sake of exhaustivi= ty. --=20 Guillaume Yziquel http://yziquel.homelinux.org/