Solved

dll and lib files

Posted on 2002-04-22
3
311 Views
Last Modified: 2010-04-02
I'm currently playing with creating dll's in visual c++.
Everything's working great. I just a a small question.
When you compile the project, two files are created:
lib and dll. Am I correct in assuming that the dll is the
actual executable code, and that the lib file is like a
kind of descriptive file that explains to the program whats in the dll?

-Chris
0
Comment
Question by:CPOsosky
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 6960750
You are absolutely right - the lib file (also called "import lib") only satisfies the linkers need to resolve all symbol names; it merely is an "import table" that points to the DLL itself.
0
 
LVL 86

Expert Comment

by:jkr
ID: 6960758
BTW: Here's the description from the VC++ glossary:

"import library
A .LIB file that contains information about one or more dynamic-link libraries (DLLs), but does not contain the DLL's executable code. The linker uses an import library when building an executable module of a process, to provide the information needed to resolve the external references to DLL functions. "
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6961179
>>and that the lib file is like a kind of descriptive file that explains to the program whats in the dll?

You might have a misconception.  The LIB file is used only by the LINKER.  Later, when a program accesses the DLL, the LIB file is not needed.  So it doesn't 'explain to the program...', rather, it 'explains to the LINKER...'.

-- Dan
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
c++ mixing int and strings in multi array 8 71
Handle Exceptions during instantiation 28 411
Issue accessing member variable of atomic class 16 110
What is sub-make ? 2 38
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

919 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

21 Experts available now in Live!

Get 1:1 Help Now