Re: Why this difference ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dileep,

The difference, in part, is because you are ignoring that a large portion of
both programs is the Standard C Library and the Standard C++ Library.

On Debian Linux, those libraries are in shared object (.so) libraries.  You
can see them by using the 'ldd' command on your binary executable.

On Windows XP with MinGW, those libraries are linked in statically (if I
recall correctly).

The C++ I/O Stream subsystem is pretty beefy (and has a lot more capability)
than the C I/O facilities.  And all the C++ I/O Stream facilities are
present in a C++ program, even if you don't use std::cin, std::cout,
std::cerr (unless you take explicit measures to disable them, which is a
non-trivial exercise).

Despite all that, there may be tricks one can employ to reduce the size of
the binary executables, on both platforms.

Did you 'strip' the executables?

HTH,
--Eljay



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux