How does visual studio 2010 treat .lib files that are not used

133 Views Asked by At

according to my another question , suppose that I have a .lib files and I don't know which .lib a specific function belongs to?

Somewhere I studied if I link all of that .libs this will not effect the size of my final project?
Because VC won't install .libs that are not used in the final?
Is it true?
Can you explain me the mechanism that VS uses to link libraries?


Edited section of my question based on @HansPassants comment. How can I see the contents of a .lib file using Dumpbin.exe

I have searched my Visual studio's install folder and found the file:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\dumpbin.exe  

But when I double-click on it, I get the error:

enter image description here

Could you learn me how to use dumpbin.exe. e.g. how to introduce a .lib file to this .exe and then extract the contents of it?


Edited section of my question based on @Roger Rowland's comment

I runned dumpbin.exe from Microsoft Visual Studio 2010 command prompt and this is what I have reached for the agg.lib. How can I explore the contents of the .lib. I mean how can I understand a specific method is written in this .lib or in another?
How can I understand which .lib should I link in order not to get error when running a specific method?

enter image description here


Please learn me how to export contents of a .lib
This is what I have done already. The commands that I have entered are:

C:\Program Files(x86)\Microsoft Visual Studio 10.0\VC\> D:\JobList\Lib\GDAL_lib\x86\lib\agg.lib\EXPORTS  
C:\Program Files(x86)\Microsoft Visual Studio 10.0\VC\> D:\JobList\Lib\GDAL_lib\x86\lib\agg.lib/EXPORTS  

enter image description here


The screenshot of what I have tried up to now:
enter image description here

0

There are 0 best solutions below