Mail Archives: djgpp/1996/12/26/21:07:23
Maan M. Hamze wrote:
>
> You'll get the same amount, or close enough to it, even when you use other packages like
> Visual C++, Borland C++ ver 5 etc...etc..... The reason is that the exe includes all the info
> needed to run your program specially that DJGPP produces 32-bit protected mode apps.
> This overhead is necessary and unavoidable.
> Also, get into the habit of using:
> int main(void) or int main() for your C++ programs :):) (the void between
> the paranthesis is optional in C++).
> but not void main().
> How is that John Aldrich? :)
Excellent, thanks. That way I don't have to get on his case when he
posts sample code on here for us to debug. ;)
Actually, there is tremendously greater overhead in C++ than in C. A
basic "hello world" using C compiles to about 50k; while a C++ "hello
world" compiles to the figure mentioned above. It's an unavoidable
aspect of the C++ language on a 32-bit compiler. The FAQ mentions a
number of ways to reduce the size of DJGPP executables in section 8.15.
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com |
| Plan: To find ANYONE willing to | http://www.cs.com/fighteer |
| play Descent 2 on DWANGO! | Tagline: <this space for rent> |
---------------------------------------------------------------------
- Raw text -