Apps :: TCC not compile
Hi!I'm a new user of DSL,and I have a problem during compiling C source file with tcc.
I've put the line #! /usr/local/bin/tcc -run
at the top of the source code,and then I run the C file with tcc:
tcc filename.c -o file
and also with
tcc filename.c -c
but the shell display the message ' file stdio.h not found '.
Why the compiler can't find the library?What can I do to compile and run my file?
Thanks!
Luca
A search of these forums for "tcc" will give the answer
http://damnsmalllinux.org/cgi-bin....t=15703
thanks so much!problem fixed!
Actually, the purpose of the libtcc.h header is to use tcc as a backend for dynamic code generation. But for C standard functions (like the one in stdio.h), there is in fact no need to include anything with tcc.
I would assume a good habit would be to use the predefined macro (set to 1), so your code is more able to also compile with gcc:
#ifndef
#include <stdio.h>
#endif
Br, Florian
the forums doesn't like two underscores in a raw
So, I meant to say:
a good habit would be to use the predefined macro _ _ TINYC _ _ (remove spaces), so your code is also able to compile with gcc:
#ifndef _ _ TINYC _ _ (remove spaces)
#include <stdio.h>
#endif
Next Page...
original here.