Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: TCC not compile< Next Oldest | Next Newest >
makaai Offline





Group: Members
Posts: 2
Joined: Jan. 2007
Posted: Jan. 29 2007,16:42 QUOTE

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
Back to top
Profile PM MSN 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 29 2007,17:28 QUOTE

A search of these forums for "tcc" will give the answer
http://damnsmalllinux.org/cgi-bin....t=15703


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
makaai Offline





Group: Members
Posts: 2
Joined: Jan. 2007
Posted: Jan. 29 2007,20:13 QUOTE

thanks so much!problem fixed!
Back to top
Profile PM MSN 
florian Offline





Group: Members
Posts: 66
Joined: Dec. 2006
Posted: Feb. 01 2007,13:29 QUOTE

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
Back to top
Profile PM WEB 
florian Offline





Group: Members
Posts: 66
Joined: Dec. 2006
Posted: Feb. 01 2007,13:33 QUOTE

the forums doesn't like two underscores in a raw :O
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
Back to top
Profile PM WEB 
4 replies since Jan. 29 2007,16:42 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: TCC not compile

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code