Re: DLL and external references

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Carl Daniel [VC++ MVP] (cpdaniel_remove_this_and_nospam_at_mvps.org.nospam)
Date: 07/15/04


Date: Thu, 15 Jul 2004 14:27:31 -0700

Victor Bazarov wrote:
> alias.name wrote:
>> Thank you, I was trying mimic the shared library behavior from Unix,
>> but since DLL are essentially EXE's and not just shared objects
>> since it won't work for my purpose.
>
> I am not sure I understand that statement about shared objects. In
> order to use shared objects on Unix, you still need to link them in.
> Each .so object serves as its own import library. On Windows a DLL
> is not its own .LIB, that information is pulled into a different
> file, that's all.
>
> So, mimicking Unix behaviour is what Windows does with DLLs.

Not quite. An .so can have unsatisfied externals while a DLL cannot. The
dynamic linker will attempt to resolve those externals when the .so is
loaded using symbols available in all the other modules loaded into the
image.

The key difference is that windows doesn't have a dynamic linker - only a
dynamic loader that does little more than update a fixed table of
entry-point addresses when a module (DLL) is loaded.

-cd



Relevant Pages

  • Re: DLL and external references
    ... >> Thank you, I was trying mimic the shared library behavior from Unix, ... > I am not sure I understand that statement about shared objects. ... On Windows a DLL is ... looks like a "DLL" on windows must be completely self containing. ...
    (microsoft.public.vc.language)
  • Re: Windows: Perl:Inline
    ... This DLL is responsible to create ... > registry entries in the given Machine. ... currently my perl module is capable of creating ... > registry entries in Windows, but not in Unix, so I am trying to extend ...
    (comp.lang.perl.modules)
  • Re: Redirecting stderr
    ... programming newsgroup. ... There's no DLL support in the Unix version I use, ... If the code uses DLLs on Windows and shared libraries ...
    (comp.lang.c)
  • Re: Linux, X, ld, gcc, linking, shared libraries and stuff
    ... "Cygwin"; This is a general project to make UNIX software run on Windows, ... a pretty simple idea...the Cygwin programs use the DLL as if it ...
    (alt.lang.asm)
  • Re: /MD vs /MT
    ... Do you mean inline member function being both in the DLL and the EXE, ... As you seem to be coming from a Unix background, ... while Windows relies on a more formal ...
    (microsoft.public.vc.mfc)