Archived

This topic is now archived and is closed to further replies.

DarkEmpire

Use of Run-Time Dll version ?

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites