caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chris Hecker <checker@d6.com>
To: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] ocamlc linking loads dlls?
Date: Fri, 15 Nov 2002 00:00:13 -0800	[thread overview]
Message-ID: <4.3.2.7.2.20021114235606.03035e78@localhost> (raw)
In-Reply-To: <20021115160706G.garrigue@kurims.kyoto-u.ac.jp>


>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


      reply	other threads:[~2002-11-15  8:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-14  6:25 Chris Hecker
2002-11-14 15:03 ` Xavier Leroy
2002-11-14 18:21   ` Chris Hecker
2002-11-14 20:16   ` Nicolas Cannasse
2002-11-14 19:21     ` Chris Hecker
2002-11-15  0:55       ` Jacques Garrigue
2002-11-15  1:53         ` Gerd Stolpmann
2002-11-15  6:59         ` Chris Hecker
2002-11-15  7:07           ` Jacques Garrigue
2002-11-15  8:00             ` Chris Hecker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.3.2.7.2.20021114235606.03035e78@localhost \
    --to=checker@d6.com \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).