Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Re: how can I make a hello world executable as big as possible? (http://www.velocityreviews.com/forums/t744423-re-how-can-i-make-a-hello-world-executable-as-big-as-possible.html)

Ralph Spitzner 03-02-2011 02:58 PM

Re: how can I make a hello world executable as big as possible?
 
K4 Monk wrote:
> I'm curious, how can I, either on windows or linux, compile a program
> so that all it does is "hello world" but is heavily bloated? Is there
> a way to statically link as many libraries as possible without using
> them? I'm inspired by the fake interview in which Bjarne Stroustrup
> claimed that g++ gives a 0.5 MB executable for hello world:
> http://www.nsbasic.com/ce/info/interview.shtml
>


Use one "printf()"
Link static :-P

-rasp

K4 Monk 03-02-2011 09:43 PM

Re: how can I make a hello world executable as big as possible?
 
On Mar 2, 7:58*pm, Ralph Spitzner <r...@spitzner.org> wrote:
> K4 Monk wrote:
> > I'm curious, how can I, either on windows or linux, compile a program
> > so that all it does is "hello world" but is heavily bloated? Is there
> > a way to statically link as many libraries as possible without using
> > them? I'm inspired by the fake interview in which Bjarne Stroustrup
> > claimed that g++ gives a 0.5 MB executable for hello world:
> >http://www.nsbasic.com/ce/info/interview.shtml

>
> Use one "printf()"
> Link static :-P
>
> * * * * -rasp


How can I do this? Wait, let me check the gcc manpage :3

K4 Monk 03-02-2011 09:45 PM

Re: how can I make a hello world executable as big as possible?
 
On Mar 2, 7:58*pm, Ralph Spitzner <r...@spitzner.org> wrote:
> K4 Monk wrote:
> > I'm curious, how can I, either on windows or linux, compile a program
> > so that all it does is "hello world" but is heavily bloated? Is there
> > a way to statically link as many libraries as possible without using
> > them? I'm inspired by the fake interview in which Bjarne Stroustrup
> > claimed that g++ gives a 0.5 MB executable for hello world:
> >http://www.nsbasic.com/ce/info/interview.shtml

>
> Use one "printf()"
> Link static :-P
>
> * * * * -rasp


Excellent, I got a binary 676K in size...


All times are GMT. The time now is 05:46 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.