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 QAA09921; Thu, 14 Nov 2002 16:03:51 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA09893 for ; Thu, 14 Nov 2002 16:03:50 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gAEF3mX14013; Thu, 14 Nov 2002 16:03:48 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA10038; Thu, 14 Nov 2002 16:03:48 +0100 (MET) Date: Thu, 14 Nov 2002 16:03:48 +0100 From: Xavier Leroy To: Chris Hecker Cc: caml-list@inria.fr Subject: Re: [Caml-list] ocamlc linking loads dlls? Message-ID: <20021114160348.B9597@pauillac.inria.fr> References: <4.3.2.7.2.20021113221318.03f89028@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <4.3.2.7.2.20021113221318.03f89028@localhost>; from checker@d6.com on Wed, Nov 13, 2002 at 10:25:09PM -0800 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Why does ocamlc load dlls during linking? Just to make sure that all external C functions referenced from your Caml code are indeed defined in the DLLs you provide. Otherwise, the error would only be detected at run time, and earlier is better. > a) dlls that aren't in the path during build, and > b) dlls that do complex stuff in their dllmain. I agree b) is a bit of a problem, but I don't know of any portable way to test whether DLL x.dll defines symbol "foo" than to link x.dll and query the address of "foo". > ocamlopt doesn't do it, for what it's worth. Sure: ocamlopt links statically the Caml/C stub code. It doesn't use the DLLs. - Xavier ------------------- 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