473,395 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Dyanmic or link or static?

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

Nov 17 '05 #1
2 1262
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

Egbert Nierop (MVP for IIS) wrote:
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

Nov 17 '05 #2
"Tamas Demjen" <td*****@yahoo.com> wrote in message
news:up**************@TK2MSFTNGP15.phx.gbl...
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.
Tom

Egbert Nierop (MVP for IIS) wrote:
Hi,


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: TGF | last post by:
Hello, I am creating a console app. I try to link a static library by including it in the Linker-Input-Additional Dependencies field under the Project properties. Then I specify the path to...
1
by: Jean-Francois Brault | last post by:
I wrote a crappy class for radian angle management. The class consists of an array of radian values. I put all these things in a class in which all methods are static, so I can access it anywhere...
2
by: free2cric | last post by:
Hi, I have two c++ static libraries say A.lib and B.lib. I am creating third static library C I create project in microsoft visual studio as win32 static library. I go to project-> settings ->...
2
by: Angel Lopez | last post by:
I am quite a beginner in C. I am writting an application on my debian linux computer that uses some imagemagick library functions. I can link them and compile (with cc) in my computer but when I...
1
by: Chris | last post by:
I have a DLL that I would like to use in VB.NET but I am not sure how to link to it. It is called PerlinDLL.dll and is a dll that spits out a bitmap of a fractal image.(link:...
9
by: incredible | last post by:
how to sort link list of string
5
by: Amoril | last post by:
I've read quite a few different message on various boards and for some reason I'm still having trouble wrapping my head around this viewstate maintenance and trying to get these dynamically created...
12
by: prashant | last post by:
hi, i am trying to create an xml tag ref to hold link.php?id=1; or link.php?id=2 and so on. I want the links for all the fields(id) in the databse so that when i call them in my html page for...
1
by: pupilstuff | last post by:
hi guys i wan to make dyanmic crystal report according to values which i checked from check box thats all i did 1. I made data set having data table name "Customer" 2 i put four columm id,name...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.