This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Where can I get Cygwin 20.1b?

Michael Nelson wrote:
> > That's a complicated question.  Essentially, the MS engineers
> > were on crack when they designed Windows DLLs.
> >
> > [long discussion]
> Use of dllimport is unnecessary, just link with the import lib.

Really?  Is that true of _all_ Windows compilers?

> > PPS: I've heard you can do the same thing using separate
> > ".DEF" files, but I don't know about that.
> This is what most people do.

That doesn't make it better.

> > PPPS: None of this is necessary with reasonable operating
> > systems, such as Unix or Linux.  The compiler and linker 
> > automatically export and import all externally visible symbols
> > when building or using DLLs (shared libraries).  You don't
> > even need a separate import library.
> The drawback with "reasonable" operating systems is that all of your
> internal guts are exposed to the world. For some that is a
> disadvantage.

Just your externally visible symbols are exposed, not the "guts" .  They are
all exposed and accessible under Windows too, regardless of what you
export!  Don't be fooled into thinking that just because you don't put it in
your export list that it is not exposed.  LoadLibrary() and GetProcAddress()
work just fine regardless of whether or not the symbol was exported to an
import library!  So I hope your company doesn't rely on its DLLs "guts" not
being exposed simply because you don't put an entry in your .def file...

In short, Windows DLLs afford _no_ benefits over Unix shared libraries but
are much more difficult to build, use and maintain.  So, yes, I do believe
that the Unix method is "reasonable" and the Windows method is not.

> -mike

Hope this clears things up for you,
Carl Thompson

Want to unsubscribe from this list?
Send a message to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]