Pointless tinkering with TinyCC

Tom, March 21 2008
What could possibly be more geeky than taking a perfectly working win32 Java launcher and taking several hours to replace it with a different one just to save sixty kilobytes in a twenty megabyte game?

Nothing!

So I did it and it turned out to be very satisfying. After all, how could I resist using a compiler called TinyCC? Tiny means good, optimized, fast, superior. Always! It looks like TinyCC comes from the good old days, when programmers wrote efficient code and things were generally better, blah blah.

Anyway, TinyCC is a very very fast C compiler that can produce very very small EXE files. It is so fast that some people have used it to compile and boot the Linux kernel in 15 seconds, which I think is fairly impressive, as much as compiling the linux kernel can ever be. Fifteen seconds. I mean, what can you do in that time? Look out of the window and sigh?

TinyCC: fabrice.bellard.free.fr/tc…

The only problem with TinyCC is that it's linker is very basic so you cannot just tell it to embed an Icon resource into the EXE.

And you wouldn't believe how hard it is to add an icon to an existing EXE file from the command line. I ended up using two different utilities to do the job, ResHacker to import the icon inside the EXE file and IconInjector to fix it so Windows can actually pick it up and display it in Explorer. Now it all works fine as part of the build script and I no longer need to keep Visual Studio around just to change the icon. Woohoo! Now, on to things that actually matter...

Comments

So ....? I mean, are you going to share your experiences in more detail or was that all?
Well, what would you like to know? I'm not going to write a book on it, already lost quite a lot of time trying to stuff that icon into the EXE.

If you are curious about it then just download it and compile some programs with it. Cheers!
Ok, i compiled smaller programs for windows with TinyCC, and linked resources .rc directly to executable file with rc.exe create .res file and reslink32.exe linked to exe.
It's all
for a program;
I compiled with Dev c and 700kb
and Tinycc is only 3kb

or running UPX in this program is more small so
No HTML

Your comment

No HTML allowed. Strings that start with http:// will turn into clickable links automatically.

Spam protection. How much is two by three?

Name: Email:
Games
Devastro
Titan Attacks
Chocolate Castle
Shop
Buy Devastro
Buy more games
Newsletter
Subscribe
Unsubscribe
Blog
Latest posts
Browse all posts
Subscribe to feed
Contact
Contact us
Feedback form
Game name generator