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 PAA13193; Wed, 14 Nov 2001 15:20:05 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA13441 for caml-list@pauillac.inria.fr; Wed, 14 Nov 2001 15:20:04 +0100 (MET) 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 PAA12715 for ; Wed, 14 Nov 2001 15:10:59 +0100 (MET) Received: from chopin.ai.univie.ac.at (chopin.ai.univie.ac.at [131.130.174.170]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id fAEEAvT19036 for ; Wed, 14 Nov 2001 15:10:57 +0100 (MET) Received: (from markus@localhost) by chopin.ai.univie.ac.at (8.9.3/8.9.3/Debian 8.9.3-21) id PAA10994; Wed, 14 Nov 2001 15:10:45 +0100 Date: Wed, 14 Nov 2001 15:10:45 +0100 From: Markus Mottl To: Jacques Garrigue Cc: caml-list@inria.fr Subject: Re: [Caml-list] Ocamlmakefile and Lablgtk Message-ID: <20011114151045.A10467@chopin.ai.univie.ac.at> References: <20011113004047.A9036@fichte.ai.univie.ac.at> <20011113091034.B22883@hars> <20011113095414.A11405@fichte.ai.univie.ac.at> <20011114225746Z.garrigue@kurims.kyoto-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011114225746Z.garrigue@kurims.kyoto-u.ac.jp>; from garrigue@kurims.kyoto-u.ac.jp on Wed, Nov 14, 2001 at 22:57:46 +0900 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 14 Nov 2001, Jacques Garrigue wrote: > From: Markus Mottl > > But why not just link the module in the right order with the rest of > > the library? Then things will be initialized as required. Or are there > > circumstances where you don't want initialization? > > This is exactly the reason. > Take for instance Unison. It is linked with lablgtk, but does not want > to initialize GTK+ when used in text mode. This is very important, > otherwise you would need an X-server running everytime you start > Unison. Ok, I see, I didn't know what kind of initializations have to be performed. > While Unison was the original reason, I think it is indeed good > practice to initialize by hand, without linking gtkInit.cmo. I agree. > So the rule of the thumb is: use gtkInit.cmo if you are developping > with the toplevel and all your program is included in one file, but > switch to explicit initialization as soon as it gets bigger. This way, > OCamlMakefile should not be a problem :-) OCamlMakefile respects the order of files as defined by the user to exactly avoid this problem of initialization order in the presence of side effects. So blaming OCamlMakefile for wrong linking order is not an excuse :-) Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr