Browse thread
[Caml-list] ocamlc linking loads dlls?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Chris Hecker <checker@d...> |
| Subject: | Re: [Caml-list] ocamlc linking loads dlls? |
>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