Static/dynamic dlls

Daniel Keep daniel.keep.lists at gmail.com
Fri Jul 27 23:06:44 PDT 2007


Karl wrote:
> I can't understand the difference between a static and a dynamic dll.
> 
> A little help please hehe.

I don't think there's any such thing as "static dll"s and "dynamic
dll"s.  I think you have your terminology mixed up.

A "static library" is a bundle of code and data, and so is a "dynamic
link library" (which are commonly called "DLLs").  The difference is
that a static library is designed to be linked into a program at compile
time, and a DLL is designed to be linked into a program at run time.

Static libraries are generally .lib files, whilst DLLs are .dll files.

The only other thing to be careful of is that there are various kinds of
.lib files, not all of which are compatible with each other.  For
instance, DigitalMars' linker doesn't work with .lib files compiled for
current versions of Visual C++.  DLLs, on the other hand, tend to work
fine once you're got an interface for them.

Hope that helps.

	-- Daniel


More information about the Digitalmars-d-learn mailing list