DIGIT-ARC read-only archive · snapshot: July 23, 2026

C programming in Damn Samll Linux.Is it possible?

10 posts · originally from https://geek.digit.in/community/threads/c-programming-in-damn-samll-linux-is-it-possible.10184/

I
imagineer_aman Original post #1
May 22, 2005 at 11:52 PM
I have the Live Cd Distro of Damn Small Linux.Its really cool.I am able to learn a lot of unix commands from the xterm.But alas,i aint able to compile any of the programs that i type in vi editor
(eg: i created a sample file a.c
in the $ prompt i gave :$cc a.c
cc : command not found.... was the reply.)
now is it possible to compile c progams in DSL?
pls tell me!
Thanks
P
May 23, 2005 at 1:05 AM
i dont think gcc is there on DSL any way i am sure it can be loaded.
$gcc a.c
GNUrag
GNUrag #3
May 23, 2005 at 6:43 PM
DSL contains a tiny ANSI C compiler named tcc

Use $ tcc filename.c to compile your c programs
I
May 26, 2005 at 1:32 AM
Thanks a ton guys!i'll try it out and tell u!
I
May 28, 2005 at 2:14 AM
Dear pradeep,
gcc does not work. it says the same thing...
gcc:command not found.

Dear Gnurag,
tcc does work but i get an error saying "stdio.h" not found.so i just copied stdio.h file in the same folder as a.c
Still it gives the same error.
How do i make the compiler work??
GNUrag
GNUrag #6
May 28, 2005 at 2:22 AM
its a tiny c compiler, so many things wont work out of the box.

if you copy stdio.h file in the same folder as a.c then you have to declare the include statement like this:

#include "stdio.h"

i'm skeptical if this works.. you may need to copy more header files, or install proper compiler like gcc
H
h4xbox #7
May 28, 2005 at 10:09 AM
how abt using tc from windows after installing wine / crossover office
GNUrag
GNUrag #8
May 28, 2005 at 5:49 PM
h4xbox said:
how abt using tc from windows after installing wine / crossover office
then what's the point of using Damn Small Linux..
I
Jun 1, 2005 at 9:39 PM
Hey guys.
Thanks a ton for the replies.
i found out how to make the compiler work
i just need to type the program as follows...
void main()
{printf("HI");}//without including stdio.h

$tcc a.c //to compile using Tiny C Compiler
$./a.out //to get the o/p
A
Jun 2, 2005 at 10:14 AM
Just another question. How does DSL get installed. It says that it can install only on hda5!!