开发者

Visual C++ application/libarary size anomoly

开发者 https://www.devze.com 2022-12-20 08:01 出处:网络
This is just a bit of a general question regading app/lib file sizes. When I build a particular library in my C++ solution I notice that the .lib file size is larger in the release build than in the d

This is just a bit of a general question regading app/lib file sizes. When I build a particular library in my C++ solution I notice that the .lib file size is larger in the release build than in the debug (1.2mb Vs 800k). However when I build an app in the same solution, using the aforementioned library, the release .exe is always smaller (as I'd expect) than thew debug 开发者_运维百科.exe (50k vs 200k). I would always have expected the release verisons of anything to be smaller than the debug versions. What gives?


It could be since you did not say, that there is a release lib and debug lib. Using the lib allows the linker to be able to fix up the references to the functions found in the associated corresponding DLL. As for in general, release builds strips off debugging information and generally, optimized code.

Hope this helps, Best regards, Tom.

0

精彩评论

暂无评论...
验证码 换一张
取 消