This guide will get you up and running with TinyCC in just a few steps. You’ll learn how to compile and run C programs using TCC’s unique direct execution feature.
Before starting, make sure you have installed TinyCC on your system.
TCC’s killer feature is the ability to compile and execute in one step:
tcc -run hello.c
Output:
Hello World
The -run option compiles the code in memory and executes it immediately without creating an executable file. This is perfect for quick testing and scripting!
3
Create an executable (optional)
If you want to create a standalone executable:
tcc hello.c -o hello./hello
This creates a binary file named hello that you can run anytime.
Using <tcclib.h> instead of <stdio.h> results in faster compilation times. It’s especially useful for floppy disk or embedded environments where space is limited.
TCC optimizes for compilation speed, not runtime performance. For production code where runtime speed matters, consider using GCC or Clang with optimization flags like -O2 or -O3.
Learn about all TCC command line options and flags
C scripting guide
Master advanced C scripting techniques with TCC
libtcc API
Use TCC as a library for dynamic code generation
Features
Explore TCC features and capabilities
Try using TCC for your daily C development tasks. The instant compilation feedback makes it great for learning C, testing algorithms, and rapid prototyping.