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 JAA32295; Fri, 15 Nov 2002 09:01:06 +0100 (MET) 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 JAA32274 for ; Fri, 15 Nov 2002 09:01:05 +0100 (MET) Received: from relay.pair.com (relay1.pair.com [209.68.1.20]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id gAF813123658 for ; Fri, 15 Nov 2002 09:01:04 +0100 (MET) Received: (qmail 70219 invoked from network); 15 Nov 2002 08:01:01 -0000 Received: from arda.pair.com (HELO compaqreview.d6.com) (209.68.1.133) by relay1.pair.com with SMTP; 15 Nov 2002 08:01:01 -0000 X-pair-Authenticated: 209.68.1.133 Message-Id: <4.3.2.7.2.20021114235606.03035e78@localhost> X-Sender: checker@localhost X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Fri, 15 Nov 2002 00:00:13 -0800 To: Jacques Garrigue From: Chris Hecker Subject: Re: [Caml-list] ocamlc linking loads dlls? Cc: caml-list@inria.fr In-Reply-To: <20021115160706G.garrigue@kurims.kyoto-u.ac.jp> References: <4.3.2.7.2.20021114225611.04224098@localhost> <4.3.2.7.2.20021114112057.03313b40@localhost> <20021115095508R.garrigue@kurims.kyoto-u.ac.jp> <4.3.2.7.2.20021114225611.04224098@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >It would fail at load time. >As I'm not a windows programmer, I don't know (too much) what is an >import library. On unix, an undefined symbol in a linked dll is a >static linker error. You only may get a load-/runtime error if you >explicitly use dlopen, or if you physically change the dll for an >incompatible one (not supposed to happen!). On windows you link with a library called the "import library" for the dll. The linker never touches the dll. So yes, you can get the wrong import library and fail to load (just like changing the dll on unix). But, I now see where the disconnect is...I didn't know unix touched the actual dll to link. I can see advantages and disadvantages to that. It still doesn't guarantee loading, for the "change the dll" case, as you point out, but it does avoid the [very rare "(not supposed to happen!)"] error with a dll-import library mismatch. The big advantage is not needing to carry around and distribute an import library, which is a pain on windows. Chris ------------------- 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