Help with Visual C++.NET

C

codejunkie

Hello, folks! Newbie question here: I just purchased Visual C++.NET
2003 Standard and have found the build sizes to be rather large. A
simple "Hello World" executable (console) comes to 44Kb and a standard
window (nothing more than a window) executable comes to 23Kb, both
compiled to "Release". I have compiled the exact same code under
Dev-C++ and those executables are 4kb and 5Kb, respectively. What the
heck is with this? Does anyone have any suggestions? Thank you.
 
A

Artie Gold

codejunkie said:
Hello, folks! Newbie question here: I just purchased Visual C++.NET
2003 Standard and have found the build sizes to be rather large. A
simple "Hello World" executable (console) comes to 44Kb and a standard
window (nothing more than a window) executable comes to 23Kb, both
compiled to "Release". I have compiled the exact same code under
Dev-C++ and those executables are 4kb and 5Kb, respectively. What the
heck is with this? Does anyone have any suggestions? Thank you.

Erm, posting to a newsgroup where this would be relevant comes to mind.

--ag
 
M

Malcolm

codejunkie said:
A simple "Hello World" executable (console) comes to 44Kb
Measuring the size of "Hello World" used to be a popular metric, but it is
no longer very useful. The compiler system is designed to produce
all-singing all-dancing desktop executables that interact with other
programs, not trivial programs with a minimum footprint. It is unlikely that
the size of the executable will be an issue anyway.
 
A

August Derleth

Measuring the size of "Hello World" used to be a popular metric, but it is
no longer very useful.

It should tell you how large the natural minimum overhead will be for any
program you compile, one that has an absolute minimum of its own code and
a minimum reliance on external support systems. If the code needed to
write one line to a console bloats, I think it's a good time to look at
command-line options and how that dashed linker is implemented. (Or
whatever you guys on Windows platforms use.)

(To compare, using gcc on Linux-x86, "hello world" weighs in at 4,723
bytes with no optimizations of any kind. (That is, cc hello.c -o hello))
The compiler system is designed to produce
all-singing all-dancing desktop executables that interact with other
programs, not trivial programs with a minimum footprint.

This shouldn't matter. If the linker is too stupid to know that 43k worth
of code will not be called, or if the compiler imposes a really heavy
runtime environment, I'd begin to doubt my investment in the development
system.
It is unlikely that the size of the executable will be an issue anyway.

This I agree with, but 10 times a comparable compiler's result? Hell, he
might as well be programming in VisualBasic.

Besides, for something I pay money for, I want a relatively intelligent
product. Linkers that throw gobs of code at every possible program and
compilers that actively de-optimize code[1] aren't acceptable.

[1]Hyperbole, I hope.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,821
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top