Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio statically linked application way too small

I am building a win32 application in C++. I have two static lib projects (open source libs) that I am compiling and using in the application. The static libraries for these projects are both over 50MB. However, my executable is only 3MB. This doesn't seem right, even though if I copy the executable (only) over to another machine everything seems to run fine.

I have followed all of the visual studio instructions for VS2010 static linking a project. i.e. Properties->Framework And References-> Adding the static lib project.

Any ideas?

like image 919
Jonathan Henson Avatar asked Dec 07 '25 07:12

Jonathan Henson


1 Answers

A static link will include just the parts you're using from the libraries, so it could easily be that your executable is much smaller than the libraries.

like image 111
Adrian McCarthy Avatar answered Dec 08 '25 21:12

Adrian McCarthy