Solved

basic question on dlls and libs

Posted on 2013-06-14
2
394 Views
Last Modified: 2013-06-14
Hi Experts,

To my understanding, libs are the function address tables used to tell code how to access info in the dlls that they describe.  Why is it then, that sometimes I can compile a static library (to a .lib) and use it in another project without ever needing a dll and other times I need to specify a lib and then place the dll in the same folder of the exe for it to run?

Thanks!
Mike
0
Comment
Question by:thready
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 39247682
A static library already contains all the code that the linker needs to complete your application. Basically, that code (no less, no more, regardöess pf what else a static lib contains) is extracted from a static library at link time and added to your program (or DLL), causing a larger binary.

The one that come with DLLs are import libraries, which indeed only contain call stubs that refer to the DLLs they belong to,
0
 
LVL 1

Author Closing Comment

by:thready
ID: 39247759
Thanks!
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question