Thread: .lib file is a static library file or DLL implicit linking file?

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    .lib file is a static library file or DLL implicit linking file?

    Hello everyone,


    If I am given a .lib file, how can I check whether the .lib file is a static library file (archive of obj files) or DLL implicit linking file? I have such confusion since they both use the same extension name .lib.


    regards,
    George

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Did a .dll with the same name come with it? Is the library size appropriate for the amount of functionality it contains, or is it much smaller? These are usually your best clues.

    If that doesn't help, you should look for a tool that displays the dependency information of the lib; if it's an import lib, the DLL will be there.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thank you CornedBee,


    Quote Originally Posted by CornedBee
    Did a .dll with the same name come with it? Is the library size appropriate for the amount of functionality it contains, or is it much smaller? These are usually your best clues.
    I think your above solution is not a perfect solution since if there is no accompanied DLL file and when the knowledge of exported function of the DLL is very limited, the solution will not work. Right?

    Quote Originally Posted by CornedBee
    If that doesn't help, you should look for a tool that displays the dependency information of the lib; if it's an import lib, the DLL will be there.
    Seems a very good idea! Could you talk more details, like what tool to use and how to use?


    regards,
    George

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I believe Dependency Walker will do this for you. If the library is not static, it will show you the depending DLL
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thank you Mario!


    Quote Originally Posted by Mario F.
    I believe Dependency Walker will do this for you. If the library is not static, it will show you the depending DLL
    I am using Microsoft Visual Studio 2003, and in this environment, which tool should I use? I can find find a tool called "Dependency Walker" from the listed tools of Visual Studio 2003.


    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  2. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  3. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM
  4. what does this mean to you?
    By pkananen in forum C++ Programming
    Replies: 8
    Last Post: 02-04-2002, 03:58 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM