Skip to main content

Installation

TinyCC is designed to be easy to build and install on all major platforms. Follow the instructions for your operating system below.

Linux and macOS

1

Download the source

Clone the TinyCC repository or download the latest release tarball:
2

Configure the build

Run the configure script to detect your system and set up the build:
Run ./configure --help to see available configuration options, such as custom installation paths or cross-compilation settings.
Common configuration options:
3

Build TinyCC

Compile the TCC binary:
This typically takes just a few seconds on modern hardware.
4

Run tests (optional)

Verify that TCC works correctly on your system:
The test suite runs various C programs through TCC to ensure correctness.
5

Install TinyCC

Install TCC to your system (requires root/sudo):
By default, TCC installs to /usr/local/bin. The installation includes:
  • tcc binary in /usr/local/bin
  • TCC libraries in /usr/local/lib/tcc
  • Include files in /usr/local/lib/tcc/include
6

Verify installation

Check that TCC is installed and working:
This should display the TCC version information.
The makeinfo tool must be installed to compile the documentation. If you don’t need the documentation, you can skip this requirement or disable it with ./configure --disable-doc.

BSD systems

On BSD variants (FreeBSD, OpenBSD, NetBSD), the installation process is nearly identical to Linux, with one important difference:
Use gmake (GNU Make) instead of make on BSD systems.
1

Install GNU Make

If gmake is not already installed:
FreeBSD
OpenBSD
NetBSD
2

Build and install

Follow the same steps as Linux, but use gmake instead of make:

Windows

For Windows installation, TinyCC provides native Win32 support.
1

Download Windows binary

The easiest way to get TCC on Windows is to download a pre-built binary from the official release page.Alternatively, you can build from source using MinGW or MSYS2.
2

Extract the archive

Extract the TCC archive to a directory, such as C:\tcc.
3

Add to PATH

Add the TCC directory to your system PATH environment variable to run tcc from anywhere.
4

Verify installation

Open Command Prompt and verify TCC is working:
For detailed Windows-specific information, including building from source on Windows, refer to tcc-win32.txt in the TCC source distribution.

Configuration options

The ./configure script accepts several options to customize your installation:
For cross-compilation support (building code for different architectures), use --enable-cross during configuration. This allows you to compile ARM code on x86_64, for example.

System requirements

Build dependencies

  • C compiler (GCC, Clang, or another C compiler to bootstrap TCC)
  • GNU Make (or gmake on BSD)
  • Standard development tools (ar, sed, etc.)
  • Optional: makeinfo for building documentation

Runtime dependencies

TCC has minimal runtime dependencies:
  • Standard C library (glibc, musl, or system libc)
  • Dynamic linker (for shared library support)
Once built, TCC itself is self-contained and doesn’t require GCC or any other compiler to be installed for using it.

Troubleshooting

Make sure you’ve downloaded the source code and are in the correct directory. The configure script should be in the root of the TCC source tree.
Use gmake instead of make on BSD systems. Install GNU Make if it’s not already available.
You need root privileges to install to system directories. Use sudo make install or configure with a different --prefix that you have write access to.
Some tests may fail on certain systems or configurations. If only a few tests fail and TCC works for basic programs, this is usually acceptable for personal use. Check the TCC mailing list or issue tracker for known issues.

Next steps

Quick start guide

Now that TCC is installed, try compiling your first program