TCC not compileForum: Apps Topic: TCC not compile started by: makaai Posted by makaai on Jan. 29 2007,16:42
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 Posted by mikshaw on Jan. 29 2007,17:28
A search of these forums for "tcc" will give the answer< http://damnsmalllinux.org/cgi-bin....t=15703 > Posted by makaai on Jan. 29 2007,20:13
thanks so much!problem fixed!
Posted by florian on Feb. 01 2007,13:29
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 Posted by florian on Feb. 01 2007,13:33
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 |