Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compiling to small small size?

Status
Not open for further replies.

alistairpaul

Programmer
Apr 11, 2001
100
US
I'm a SQL DBA and part-time VB/VBS/ASP programmer. I've come upon something I'd like to do in C/C++, and don't know the language, but would like to learn.

While playing with Visual C++ (6) last night, I made a silly little "hello world" app, with one single printf() line and an include of only stdio.h.. The resulting executable came out to be 150k, which i thought was absolutely outrageous. I spoke to a programmer at work today and he said that I probably compiled in debug mode. He made the same thing and compiled not in debug mode and got a resulting file of 60k. I still think that this is way over what it should be. Am I wrong for this? I had thought that this file shouldn't be any more than maybe 5-10-at the most 20k!

Is there a way to compile, perhaps with a different compiler to make files down to a small size like this? I'm looking at this for bandwidth concerns.

Thanks!
 
did you use MFC or not? MFC would add to the size of the app.

try making the first option, writing the main yourself and including <iostrem.h> See what you get there.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top