Jump to content
  • Advertisement

Archived

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

thuned

getting a small filesize w/ c++

This topic is 6360 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i use vc++ 6.0 and when i to a simple "hello world" program using console mode the exe comes out to be 16k. now i know windows fills the exe w/ 0''s for some weird file restrictions so i used upx to get it to like 2.5k. that''s still a bit big, how can i get it smaller w/o using asm? life is unfair, take advantage of it. UNMB2 - if the link doesn''t work, try clicking it

Share this post


Link to post
Share on other sites
Advertisement
well, i used /opt:ref and also multithreaded dll. as for upx, i only noticed like a 10% increase in ram usage (win2k task manager), or is there anything else that''s better?

life is unfair, take advantage of it.
UNMB2 - if the link doesn''t work, try clicking it

Share this post


Link to post
Share on other sites
I don''t personally think 16 KB is all that big of a file (my current project''s executable''s size is around 88 KB, and it is just the core right now). Paint Shop Pro 7''s executable is 8.82 MB . I wouldn''t worry about file size as much as runtime RAM usage.

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/

Share this post


Link to post
Share on other sites
Make sure that you set your build to a Release Build. My Hello World program in C++ on Win98 is only 3.5 KB

And UPX bloats up your memory footprint. Make a bigger app. You'll see a bigger difference.

Personally, I think file sizes aren't as important as the amount of memory the program uses when run.

Oh and use the linker option /OPT:NOWIN98 as well. That shaves about 7 KB of the exe size

Edited by - NuffSaid on April 22, 2001 7:55:22 AM

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!