Apps :: TCC won't compile



I have a very simple program

=====
/*Filename test.c */
int main()
{    int x=2,y=3;
    int z=x+y;
    return 0;
}
=====
I try to compile it using the command

tcc test.c

and it returns the error
Undefined symbol __libc_start_main

It's the same for any program I try. What is the problem? Am I doing something wrong?

yes :)
But  you could hardly have known...
You have to tell TCC to which lib to link. There have been similiar topics arround.
You may wanna have a look at the tcc-how-tos or use a search.
But the direct answer to your problem would be: compile with:
Code Sample
tcc -o test.run -lstdc++-3-libc6.1-2-2.10.0 test.c

You may also wanna take a look at that small TCC-tutorial of mine arround in the How-To-Forum...
That might clear things up a bit when it comes to linking and stuff...
Hope that helps,
enthusi

Ah thanks a lot. That helped :)

original here.