Apps :: Tiny C Compiler



Would it be possible to have a newer version in next release of DSL ? I tried a simple hello world, and the stdio.h library is missing :(

http://fabrice.bellard.free.fr/tcc/changelog.html

Thanks a million in advance  :;):

Hi there :)
DSL does not habe those .h - files
You dont need them anyway.
There is a tcclib.h which includes a lot of them.
You can just copy those you need into it.
Right now I'm writing a little tutorial for TCC and DSL.
try the following:
Code Sample
#include "/usr/lib/tcc/include/tcclib.h"

and compile it with
Code Sample
tcc -o yourfile  -lstdc++-3-libc6.1-2-2.10.0 yourfile.c

That should work.
The .h - files "only" contain the declaration. You can declare them yourself if you like...
Linking them to the correct libs is the important thing!
You can make your own .h-header-file or add needed functions to that tcclib.h

Hope this helped...
Ask again if not... I think TCC is wonderful
and if you are interessted watch out for that little example-proggy I'm gonna post soon :)

Off now,
enthusi

This is good information. I'm looking forward to your tutorial.

Since you seem to know something about tcc, do you know what  the problem is when compiling a simple "hello world" program results in:
tcc: _start not defined

Thanks,

Hi :)
It will be ready soon :)
Your error sounds familiar but I dont remember :(
Maybe you can post or email your c-programm and the command line you use for compiling?
I could test it here then...

Greet's,
Enthusi

Hi there :)
I just uploaded a small C/TCC - Tutorial for DSL.
I wrote a small program during christmas when I had nothing with me but my beloved DSL-cd :)
I commented almost every line of the code...
I was quite sceptical about TCC and wanted the good "old" GCC...
TCC may not suit for general source-compilation but it is astonishing powerful for own little projects.
Maybe someone's interessted - please feel free to comment on it. I will start a thread in HOW-TOs. And hopefully you can help me with
comments on how to improve it.
I think it would be nice to add stuff like this (ok, to be honest: please add THIS one :-) to DSL... It takes up almost no space and can add many many fun hours for the DSL-user...

Get it here:
http://allthegoodthings.tripod.com/damnsmalllinux

or type:
Code Sample

wget http://allthegoodthings.tripod.com/damnsmalllinux/tcc_tuturial_v0.1.zip

and unzip it...

Good night now,
Enthusi

Next Page...
original here.