From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA15667; Sun, 15 Sep 2002 19:25:13 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA15747 for ; Sun, 15 Sep 2002 19:25:13 +0200 (MET DST) Received: from athlon.baretta.com (host155-68.pool80116.interbusiness.it [80.116.68.155]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g8FHPC919432 for ; Sun, 15 Sep 2002 19:25:12 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id 850FB2724C; Sun, 15 Sep 2002 19:34:18 +0200 (CEST) Message-ID: <3D84C49A.1030507@baretta.com> Date: Sun, 15 Sep 2002 19:34:18 +0200 From: Alessandro Baretta Organization: Baretta srl -- www.baretta.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: it, en MIME-Version: 1.0 To: Yamagata Yoriyuki Cc: caml-list@inria.fr Subject: Re: [Caml-list] Question about linking and module initialization References: <3D8228DC.5010000@baretta.com> <20020914.185852.74758150.yoriyuki@mbg.sphere.ne.jp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Yamagata Yoriyuki wrote: >>$ ocamlc -o app app.cma > > > In this case, modules only used from the main program are linked. > Since you don't provide anything except app.cma, I guess nothing is > linked. Ah, this is the point. I did not realize that modules in a library would be selected at linking time by ocamlc. > Initialization is done by the linking order of modules in > app.cma. This is what I thought, but I did not realize that my executable would be entirely empty of modules. > Everything is explained in the ocamlc section of the manual. I had read it already, but I happened to overlook the fact that modules in libraries are linked only if referenced somewhere in the cmo files. Thank you very much. Alex ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners