Apps :: Tiny C Compiler



Quote (enthusi @ Jan. 13 2004,12:11)
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...

Actually I experienced this problem with tcc 0.9.20 on FeatherLinux (which is very similar to DSL).  The code is simply:
Code Sample

#include <tcclib.h>
void main( void )
{
   printf( "hello, world\n" );
}

and compiled with:
Code Sample

tcc -o hello -lstdc++-3-libc6.1.2-2-2.10.0 hello.c

results in "tcc: _start not defined"
(I may not have the library filename correct but you get the idea.) Also compiling with "-c" creates hello.o but the same error occurs when attempting to link and create the executable.
As mentioned this program runs with the tcc "-run" option.
Any ideas are welcome...
Thanks,

@enthusi: Am I wrong or is the command line parameter argv[2] never taken into account? I was using Vs 0.1 of your tiny tcc tutorial and I really like it. Well done!

tbeu

@theu
damnit! you're right :)
Seems like an version 0.1.1 will be up sooner than I thought.
I inserted the argv[]-options afterwards and obviously forgot one.
argv[2] is menat for ib in line 87.
Just change ib=-1.25 to ib=atof(argv[2]).
Thanks for your comment on this!

@catfish
I will check on this today!
First ideas would be:
- does #include <tcclib.h> work, or does is have to be
#include "/usr/lib/tcc/include/tcclib.h" ?
- a void-main-function is not very common and not necessaryly supported.. Maybe it is only allowed with C++.

But as I said - I will check this out today and hope to be more helpful then

@all
have a nice day,
enthusi

Hi again.
@catfish
I just tried and it works fine over here...
sorry
I found a little error though: you mistyped the lib.
-lstdc++-3-libc6.1.2-2-2.10.0
instead of
-lstdc++-3-libc6.1-2-2.10.0
I tried to compile with the latest TCC 0.9.20.
I think it would be best to include the tcclib.h with path.
I dont know FeatherLinux but there SHOULD be no problem...
In general it can be said that
when it runs with "-run" but creates no valdid executable it is not linked correctly to some libs...
I hope this helps even though I told nothing new.
Check for the lib-name and path

good luck,
enthusi

Hi folks.
There was one little line to change - so here comes the new version.
Nothing bad but I want to keep up to date.
So better forget the direkt link and just see whats up on this site :
TCC - Tutorial 16.01.04 v0.1.1

Have fun with it and please post wishes of any kidn to me :)
enthusi

Next Page...
original here.