Prebuilt binaries¶
- Installing on Windows
- Installing on Mac Arm64
- Installing on Ubuntu
- Installing on Debian
- Installing on Arch
Installing on Windows¶
- Download the C3 compiler or the debug build.
- Unzip it into a folder
Optional: set c3c as a global environment variable¶
- copy the folder
- navigate to
C:\Program Files - paste the folder here
- navigate inside the folder you've pasted
- copy the path of the folder
- search for "edit the system environment variables" on your computer
- click on the "environment variables" button on the bottom right
- under "user variables" double click on "path"
- click on "new" and paste the path to the folder
- run
c3canywhere on your computer!
Installing on Mac Arm64¶
- Make sure you have XCode with command line tools installed.
- Download the C3 compiler or the debug build.
- Unzip executable and standard lib.
- Run
./c3c.
Installing on Ubuntu¶
- Download the C3 compiler or the debug build.
- Unpack executable and standard lib.
- Run
./c3c.
Installing on Debian¶
- Download the C3 compiler or the debug build.
- Unpack executable and standard lib.
- Run
./c3c.
Installing on Arch Linux¶
There is an AUR package for the c3c compiler : c3c-git.
You can use your AUR package manager:
Or clone it manually:
Troubleshooting¶
Note: If you get an error like No module named 'std::io' could be found, you may need to set the C3C_LIB environment variable to point to the standard library location:
Bash/Zsh:
Fish:
Windows (PowerShell):
"cc: not found"¶
On Linux and MacOS, C3 uses the available C compiler to link with the correct libraries. While C3 contains a built-in linker, it is likely that your system will lack a complete environment unless a C compiler is available.
Linux users should generally install GCC or Clang, according to their distribution's documentation. Below is a list of officially tested distributions and the minimum packages required to compile and link C3 programs:
| Distribution | Required Packages | Command |
|---|---|---|
| Ubuntu / Debian | gcc, libc6-dev | sudo apt-get install gcc libc6-dev |
| Fedora / Rocky | gcc | sudo dnf install gcc |
| Arch Linux | gcc | sudo pacman -S gcc |
| openSUSE | gcc, glibc-devel | sudo zypper install gcc glibc-devel |
| Alpine Linux | gcc, musl-dev | sudo apk add gcc musl-dev |
| Void Linux | gcc | sudo xbps-install -S gcc |
On MacOS, you can either install XCode or download the stand-alone command-line tools.