Link to home
Start Free TrialLog in
Avatar of CPOsosky
CPOsosky

asked on

dll and lib files

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
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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. "
>>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