www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



c++ - hello world program too large

↑ ↓ ← Can <deep_commander hotmail.com> writes:
hello,
i am compiling a simple hello world program with optimizations
but .exe file is about 370 kb . is it normal?
Jul 31 2008
↑ ↓ → Heinz Saathoff <newshsaat arcor.de> writes:
Can wrote...
 hello,
 i am compiling a simple hello world program with optimizations
 but .exe file is about 370 kb . is it normal?

Depends on your program and what library you use. For example, this program #include <stdio.h> int main() { printf("Hello World\n"); return 0; } copiles to an .EXE of approx. 40 kB This one #include <iostream> int main() { std::cout << "Hello World" << std::endl; return 0; } compiles to an EXE that is 10 times larger. It's the overhad in the statically linked STLPORT lib. - Heinz
Aug 08 2008