Use of Run-Time Dll version ?

Started by
1 comment, last by DarkEmpire 21 years, 10 months ago
Hi, I want to reduce exe size as small as possible (without use of UPX) Here are options i use: #pragma comment(linker,"/INCREMENTAL:NO") #pragma comment(linker,"/OPT:NOWIN98") #pragma comment(linker,"/MERGE:.text=.data") #pragma comment(linker,"/MERGE:.rdata=.data") #pragma comment(linker,"/MERGE:.reloc=.data") #pragma comment(linker,"/ignore:4078") #pragma comment(linker,"/ALIGN:16384") #pragma comment(linker,"/nodefaultlib") #pragma comment(linker,"/opt:ref") #pragma comment(linker,"/entry:WinMain") #pragma optimize("gsy",on) #pragma comment(linker,"/FILEALIGN:0x200") Moreover i use /O1 /Zl options for compiler... Which options can i add / modify /delete to reduce exe size ? I read that we can use the Dll version of Run-time to reduce size ? Is it a good solution ? How can i add it to my project ? How can i use it? i use MVC++ 6 Thanks
Advertisement
You can choose the CRT library version in project settings->c/c++->code generation. I always use the dll, and what really amazes me is why large software packages consisting of dozens of exe/dlls statically link to the CRT library, resulting in incredible space/memory waste.
---visit #directxdev on afternet <- not just for directx, despite the name
quote:Original post by IndirectX
what really amazes me is why large software packages statically link to the CRT library, resulting in incredible space/memory waste.


One reason is to avoid versioning problems. It''s one less component to worry about so linking statically cuts down on support costs.

This topic is closed to new replies.

Advertisement