How to Compile a C File Using Tiny C Compiler
Create and save a C file.,Open up the terminal or command prompt , Change the directory to the C file. , Compile the C code., Run the program.
5 Steps
1 min read
Medium
Step-by-Step Guide
-
Step 1: Create and save a C file.
Do something simple like printing "Hello LifeGuide Hub". -
Step 2: Open up the terminal or command prompt
,, Type tcc
-o hello hello.c in the terminal or command prompt.
This will generate a program called hello in the same directory.
The
-o parameter specifies the name and location of the output file. , From the terminal type ./hello or in the command prompt type hello.exe. -
Step 3: Change the directory to the C file.
-
Step 4: Compile the C code.
-
Step 5: Run the program.
Detailed Guide
Do something simple like printing "Hello LifeGuide Hub".
,, Type tcc
-o hello hello.c in the terminal or command prompt.
This will generate a program called hello in the same directory.
The
-o parameter specifies the name and location of the output file. , From the terminal type ./hello or in the command prompt type hello.exe.
About the Author
P
Paul Gibson
Writer and educator with a focus on practical DIY projects knowledge.
37 articles
View all articles
Rate This Guide
--
Loading...
5
0
4
0
3
0
2
0
1
0
How helpful was this guide? Click to rate: