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
Configure the build
Run the configure script to detect your system and set up the build:Common configuration options:
Run tests (optional)
Verify that TCC works correctly on your system:The test suite runs various C programs through TCC to ensure correctness.
Install TinyCC
Install TCC to your system (requires root/sudo):By default, TCC installs to
/usr/local/bin. The installation includes:tccbinary in/usr/local/bin- TCC libraries in
/usr/local/lib/tcc - Include files in
/usr/local/lib/tcc/include
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:Windows
For Windows installation, TinyCC provides native Win32 support.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.
Add to PATH
Add the TCC directory to your system PATH environment variable to run
tcc from anywhere.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:
| Option | Description |
|---|---|
--prefix=DIR | Install TCC to directory DIR (default: /usr/local) |
--bindir=DIR | Install binaries to DIR (default: PREFIX/bin) |
--libdir=DIR | Install libraries to DIR (default: PREFIX/lib) |
--includedir=DIR | Install includes to DIR (default: PREFIX/include) |
--enable-cross | Build cross-compilers for all supported architectures |
--disable-static | Don’t build static library |
--config-predefs=yes | Force use of system predefined macros |
--cpu=x86_64 | Explicitly set target CPU architecture |
System requirements
Build dependencies
- C compiler (GCC, Clang, or another C compiler to bootstrap TCC)
- GNU Make (or
gmakeon BSD) - Standard development tools (
ar,sed, etc.) - Optional:
makeinfofor 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
configure: command not found
configure: command not found
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.
make: command not found on BSD
make: command not found on BSD
Use
gmake instead of make on BSD systems. Install GNU Make if it’s not already available.Permission denied during make install
Permission denied during make install
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.Test failures
Test failures
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