Dyanmic or link or static?

  • Thread starter Egbert Nierop \(MVP for IIS\)
  • Start date
E

Egbert Nierop \(MVP for IIS\)

Hi,

I use the llib library from adler and compiled it myself.
First I build the lib configuration, then I included zlib.h in stdafx.h and
I added a lib reference
C:\Data\zip\zlib-1.2.2\projects\visualc6\Win32_LIB_Release\zlib.lib

The implementation works. That's the good news.

But to my surprise, my original DLL with implementation grew 40 Kb in size.
So it looks as if the zlib.dll statically is linked and when I use
depends.exe no link has been made to zlib.dll

Can someone explain to me please what setting exactly makes this happen?

Thanks
 
T

Tamas Demjen

I use zlib too all the time. Here's how it works. If you link zlib.lib,
it's a static lib that doesn't require the DLL, it links the entire code
to your executable. If you link zdll.lib, that's merely an import
library for zlib1.dll. It's your choice to decide whether you want to
link the static lib or the import lib for the DLL.

Hope this helps,
Tom
 
E

Egbert Nierop \(MVP for IIS\)

Tamas Demjen said:
I use zlib too all the time. Here's how it works. If you link zlib.lib,
it's a static lib that doesn't require the DLL, it links the entire code to
your executable. If you link zdll.lib, that's merely an import library for
zlib1.dll. It's your choice to decide whether you want to link the static
lib or the import lib for the DLL.

Hope this helps,

Sure it did.
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top