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: Programming in DSL., Trouble with compilation< Next Oldest | Next Newest >
netfreak Offline





Group: Members
Posts: 1
Joined: Mar. 2004
Posted: Mar. 12 2004,15:39 QUOTE

Hi everyone. Just yesterday i was playing with DSL, one of the first things i tried was the compiler. After writing  a very simple code in C, and saving the file,  i tried compiling it but the output gave and error message. I tried another simple code in C++ but i couldn't save the file, or compile it. I'm basically new to linux. Any advice is appreciated.
Back to top
Profile PM 
catfish Offline





Group: Members
Posts: 16
Joined: Sep. 2003
Posted: Mar. 12 2004,16:07 QUOTE

The "tcc" compiler is C only. Use "#include <tcclib.h>" to get the "standard" include definitions. Link with "-lstdC++-3-libc6.2-2-10.0" (this is from memory so I'm sure the filename is wrong - look in /usr/lib/ for the right filename). Or just use the "-run" option with tcc to build and run without creating an executable.

There are several other helpful posts regarding compiling also.
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Mar. 12 2004,19:21 QUOTE

Starting with 0.6.x the link to create the executable is very simple. It is just -lc So it looks like this: tcc -o filename -lc filename.c You will need the include as Catfish pointed out.
Back to top
Profile PM WEB 
TyphoonMentat Offline





Group: Members
Posts: 183
Joined: Oct. 2003
Posted: Mar. 12 2004,19:40 QUOTE

Roberts, how did you manage to set up tcc like that? On my system (not DSL, unfortunately) I can't get tcc to work properly.
Back to top
Profile PM 
netfreak
Unregistered






Posted: Mar. 13 2004,18:08 QUOTE

Thanks for the advice everyone. I' never heard of "tcc" before. The reason why i thought it was C++ was because the output message showed g++. Oh well
Thanks again.
Back to top
4 replies since Mar. 12 2004,15:39 < Next Oldest | Next Newest >

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

 
reply to topic new topic new poll
Quick Reply: Programming in DSL.

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