Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Static library inspector for windows?

Tags:

I know there are tools like PE Explorer for inspecting the contents of DLLs on windows (exported symbols, etc). Is there something similar for static libraries? I'm linking against a third party library that's generating some linking errors, and I want to double check that the symbols I expect are indeed being provided.

like image 412
gct Avatar asked Feb 02 '10 23:02

gct


People also ask

What is static library in Windows?

There are two types of libraries: static libraries and dynamic libraries. A static library (also known as an archive) consists of routines that are compiled and linked directly into your program.

How do I install a static library?

If you want to use a static library in a program, you have to link the executable with it. The executable will then contain the static library (or the parts that you used). If you want to load a static library at runtime using dlopen , you will have to first create a dynamic library libfoo.so containing it.

How do I create a .LIB file in Visual Studio?

To create a static library project in Visual StudioOn the menu bar, choose File > New > Project to open the Create a New Project dialog. At the top of the dialog, set Language to C++, set Platform to Windows, and set Project type to Library.

Do static libraries need headers?

Static libraries allow you to create a library and use that library in many projects. The need for header files: Since the project using the library is programmed and compiled independent of the library, that program needs to know the declaration of the things you're using.


2 Answers

Dumpbin

The DUMPBIN utility, which is provided with the 32-bit version of Microsoft Visual C++, combines the abilities of the LINK, LIB, and EXEHDR utilities. The combination of these tools features the ability to provide information about the format and symbols provided in executable, library, and DLL files.

like image 51
dirkgently Avatar answered Nov 03 '22 00:11

dirkgently


dumpbin comes with Visual Studio and can peek into .lib files. read the documentation to figure out which swich you want to use or just use /all, dump it all to a file and use an editor to search the symbols you're looking for.

like image 37
shoosh Avatar answered Nov 02 '22 23:11

shoosh