>write simple hello world app in C
>compile with gcc
>59KB
>compile same code with Visual Studio
>36KB
>write simple hello world app in C
>compile with gcc
>59KB
>compile same code with Visual Studio
>36KB
Other urls found in this thread:
makezine.com
phreedom.org
twitter.com
bullshit
Static vs dynamic linking senpai
Who gives a single fuck about a O(1) compile size difference of 23KB?
Show me an O(n) or greater difference between gcc and VS where n is a measure of programming size and I would care.
Fucking code monkeys.
how?
no matter what combination of -O (-O0,-O3,-Os) or compiler (gcc, clang, g++) I use I still only get a 8.4 kB executable. (can't test Visual Studio, I'm on Linux)
>not compiling your programs with -Ofast
Does gcc on Windows always link Win32 libraries?
>you analize the VS build and you find out it contains botnet
I'll gladly that 23KB difference.
dynamic should give a smaller binary you mongrel
How? You're including the same libraries ethier way.
looks like op is just a retard
just let this thread die.
>Troll post
Report and continue
>>>/global/rules/6
>The outcome of a field tested experiment isn't what I wanted so it must be a troll post
You are lying and pretending to be a retard
That's what I'm saying
>same program in java
>414 bytes
Woah, C is full of bloat.
shitty bait
i'm working on a QT app right now
and its literally the other way around
the windows exe is like .6mb compared to 2mb
BUT i have to package like 30mb worth of QT with my windows app :|
you'd have to package Qt for Linux as well
since most DEs use GTK
>I don't know how to properly GCC, the post
actually, worded that weird
you won't have to package it, since the package manager will take care of it
but the end user will still have the extra Qt bits installed along side
8.2k you dumb cunt.
triggered freecuck detected
>hello world app
>app
Fuck off tech illiterate
...
>contains additional botnet
>still smaller
microsoft wins again
size always matters. ask your mother.
winshits and gnucux blown de fug oud
wew lad
I hate to say user called it
but...
Not c
Best C compiler for windows?
Gentoo
visual studio
gcc on suicide watch
dynamic linking though. if the user installs a second qt application, then on linux he has installed 0.5 qts per application, where the windows users has installed 2 statically linked qts, so 1 qt per application.
> 59 KB
> Hello world program in C
Go back to VisualCancer
you have bash now, don't you? use gcc
but clang is better
>compile a hello world in gcc
>it contains a longer message than the code and it is 20kB
>wow, you don't know how to code?
>>write simple hello world app in C
>>App
>msvcp140.dll missing
>compile with gcc
>59KB
It's actually heavier, lol
Dunno about VS tho
even more impressive considering the injected telemetry
i shouldnt have laughed
> i did
what the fuck?
I build this with xcode, only 9 KB
% cat hello.c
#include
int main(void)
{
fprintf(stdout, "Hello World!\n");
return 0;
}
% gcc hello.c -Wall -pedantic -o hello
% ls -l hello
-rwxr-xr-x 1 8,3K Sep 23 19:44 hello
the only thing you showed is that everything is shit on windows
>writing simple hello world in C++ on Windows
>using iostream
>compiling with g++
>exe is 2MB in size
...
gcc is old and irrelevant so thats nothing new.
What would you recommend then?
Just report this paid shilling garbage.
clang or VS.
no, you're not
If you are retarded with file size, I barely remember parameter -s (strip any debug info), -Os (optimize for size, not speed) and -m32 because 32bit pointers are smaller.
>clang
Buggy fucking mess of a compiler. There are fucking tons of WONTFIX actual proven bugs on clang/llvm's bug trackers.
>VS
Bloated outdated garbage.
Learn to use gcc correctly. Also, OP is a paid MS shill, so just ignore that asshole.
>hello world
>kb
>not bytes
pff
console.log('hello world');
save it under hello.js and it will only have a few bytes. get on my level you C old people.
>use C#
>5kb
Not saying you are wrong, but the latest VS preview is much more lightweight than previous versions (about 500mb, against 6-8gb for VS 2015)
Not sure if its worth it tho, the whole telemetry thing is a deal breaker for me.
This.
If you're programming on Windows, you might as well do it correctly.
nope, I just did it with stdio.h and it was 8k
>cat hw.c
#include
void main ()
{
printf ("%s\n", "hello world");
return;
}
>gcc hw.c -o hw
>du -h hw
8.0K hw
>./hw
hello world
>59KB
>36KB
Where are you getting these sizes from? This code:
#include
int main()
{
printf("Hello world!\n");
return 0;
}
Compiles to a 9.5KB EXE for me (VC++ 2015, x86 Release), and a 8.32KB ELF (GCC on Ubuntu/Win10, "gcc HelloWorld.cpp -o helloworld")
Could probably get them smaller using some compiler switches, but I dunno what switches would make them as big as the sizes in the OP
Also forgot to strip them in those examples too, "strip helloworld" results in a 6.10KB ELF, and configuring the VC project to not include debug info & strip reloc info results in an 8.5KB EXE.
Not really sure how to get them smaller, but like I said there's probably switches for it
Gaymes.
VS
office.
All pretty pathetic reasons to endure windows.
Unfortunately gcc refuses to merge .idata into .text so you get ~512 bytes of bloat because of section padding, with other linkers you can get down to 1KB.
The smallest possible ELF executable is 45 B
makezine.com
The smallest possible PE (.exe) executable on Windows 2000 is 133 B
phreedom.org
...
6696 bytes here without optimizations compiled for AMD64 senpai, you are full of shit. i could get it even smaller 2bh.
main (){
puts("Hello World!");
}
>If you’ve ever wondered about the mysterious events that happen before main() and after return(), here’s your chance to take the red pill.
Cred Forums confirmed best programmers!
Cred Forums BTFO!
That would only be fair if you'd also count the javascript interpreter as part of the program since you need that to run it.
I have seen this thread already.
Ofast doesn't work with certain libraries like Boost::SIMD...