Solved

basic question on dlls and libs

Posted on 2013-06-14
2
373 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now