Skip to content

Install C3 Compiler Binary

  1. Download the C3 compiler. Or the debug build .
  2. Unzip it into a folder
  3. Either Visual Studio 17 or follow the next two steps.
  4. Run the msvc_build_libraries.py Python script which will download the necessary files to compile on Windows.

Optional: set c3c as a global environment variable

Section titled “Optional: set c3c as a global environment variable”
  1. copy the folder
  2. navigate to C:\Program Files
  3. paste the folder here
  4. navigate inside the folder you’ve pasted
  5. copy the path of the folder
  6. search for “edit the system environment variables” on your computer
  7. click on the “environment variables” button on the bottom right
  8. under “user variables” double click on “path”
  9. click on “new” and paste the path to the folder
  10. run c3c on anywhere in your computer!
Terminal window
c3c compile ./hello.c3
  1. Make sure you have XCode with command line tools installed.
  2. Download the C3 compiler. Or the debug build .
  3. Unzip executable and standard lib.
  4. Run ./c3c.
  1. Download the C3 compiler. Or the debug build .
  2. Unpack executable and standard lib.
  3. Run ./c3c.
  1. Download the C3 compiler. Or the debug build .
  2. Unpack executable and standard lib.
  3. Run ./c3c.

There is an AUR package for the c3c compiler : c3c-git.

You can use your AUR package manager:

Terminal window
paru -S c3c-git
# or yay -S c3c-git
# or aura -A c3c-git

Or clone it manually:

Terminal window
git clone https://aur.archlinux.org/c3c-git.git
cd c3c-git
makepkg -si

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:

Terminal window
export C3C_LIB=/path/to/c3c/lib

Fish:

set -gx C3C_LIB /path/to/c3c/lib

Windows (PowerShell):

Terminal window
$env:C3C_LIB = "C:\path\to\c3c\lib"

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 with unless a C compiler is available.

Linux users should generally install GCC or Clang, according to their distribution’s documentation. For example, if you use Ubuntu, you can install the gcc package:

Terminal window
sudo apt-get install gcc

On MacOS you can either install XCode or download the stand-alone command-line tools: https://developer.apple.com/documentation/xcode/installing-the-command-line-tools/