What is the difference between static link library and
dynamic link library?
Answers were Sorted based on User's Feedback
Answer / mat
Static libraries are linked at compile time. Dynamic
libraries are linked at runtime
Is This Answer Correct ? | 52 Yes | 0 No |
Answer / vivek kumar kanojia
Above ans is correct and one more thing..
static library is faster than dynamic library
Is This Answer Correct ? | 31 Yes | 6 No |
Answer / kiran
above answer is correct and..
the excutable exe size will be larger when we build exe
with static library compared to dynamic library
Is This Answer Correct ? | 18 Yes | 3 No |
Answer / achal ubbott
Above answers are correct. In case of Dynamic Library your
executable will look up for the code at run time. E.g. when
running some exe it looks for help from some .dll files
provided by windows operating system. So we call this
dynamic linking.
Is This Answer Correct ? | 11 Yes | 1 No |
Answer / dinesh
The static linked library causes the corresponding information from libraries to be included in the executable DLL on the other hand inserts virtual address of memory. Thus the size of static linked file is larger than a static linked file. If we use dynamic linking the updates in library will also be effect the behavior of the file while not in static linking. Due to this reason dll is better but it can also sometimes make the program faulty due to library update.
Is This Answer Correct ? | 9 Yes | 3 No |
Answer / pushpalatha
Dynamic linking differs from static linking in that it
allows an executable module (either a .dll or .exe file) to
include only the information needed at run time to locate
the executable code for a DLL function. In static linking,
the linker gets all of the referenced functions from the
static link library and places it with your code into your
executable.
Using dynamic linking instead of static linking offers
several advantages. DLLs save memory, reduce swapping, save
disk space, upgrade easier, provide after-market support,
provide a mechanism to extend the MFC library classes,
support multilanguage programs, and ease the creation of
international versions.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sameer patel
Above answer is correct and also say that the dynamic library is executable file and shared the library for functions.
Where static library execute module and provide information needed of run time....
Is This Answer Correct ? | 0 Yes | 2 No |
Where can I run c++ program?
What are the two types of polymorphism?
write a programming using for loop in c++ to generate diamond trangel?
What do you mean by persistent and non persistent objects?
Can you declare an array without a size in c++?
Explain the pure virtual functions?
How do you establish a has-a relationship?
How many types of comments are there in c++?
Which one of the following describes characteristics of "protected" inheritance? a) The base class has access only to the public or protected members of the derived class. b) The derived class has non-public, inheritable, access to all but the private members of the base class. c) The derived class has access to all members of the base class. d) The private members of the base class are visible within the derived class. e) Public members of the derived class are privately accessible from the base class.
Is there any problem with the following: char *a=NULL; char& p = *a;?
What is cloning?
What is the benefit of c++?