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 TAA17489; Fri, 13 Sep 2002 19:56:19 +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 TAA17425 for ; Fri, 13 Sep 2002 19:56:18 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from athlon.baretta.com (r-mi214-6a222.tin.it [62.211.4.222]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g8DHuH911994 for ; Fri, 13 Sep 2002 19:56:17 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id B16B9273B9 for ; Fri, 13 Sep 2002 20:05:16 +0200 (CEST) Message-ID: <3D8228DC.5010000@baretta.com> Date: Fri, 13 Sep 2002 20:05:16 +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: Ocaml Subject: [Caml-list] Question about linking and module initialization Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk What is the difference between linking an application with the following command $ ocamlc -o app module1.cmo module2.cmo module3.cmo and $ ocamlc -a app.cma module1.cmo module2.cmo module3.cmo $ ocamlc -o app app.cma . I have noticed that if I attempt to link an executable in the latter way, the linking phase succeeds, but the executable exits immediately with exit status 0 (no error). This makes me wonder about how modules are initialized when an executable is launched. How is module initialization different for modules belonging to library files with respect to modules coming from .cmo files? 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