CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Location
    Chennai, India
    Posts
    76

    Importance of .lib file for a dll

    Hi,

    When i bulid a dll, i have a .lib file getting created. When i try to link this dll in another i am using the .lib file and not the .dll file. What is the importance of the .lib file.

    Regards,
    Varadha

  2. #2
    Join Date
    Apr 1999
    Posts
    3,585
    Using the .lib file (and associated header files) allows you to resolve any references to exported dll methods and variables at compile time.
    Gort...Klaatu, Barada Nikto!

  3. #3
    Join Date
    May 2004
    Location
    Michigan, United States
    Posts
    457
    Without it, you would need to explicitly load the DLL at runtime (LoadLibrary) and resolve addresses to the functions you wish to call.
    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured