Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

dll and lib files

Posted on 2002-04-22
3
Medium Priority
?
320 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
[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
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

618 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