Skip to content

Install the Prerequisites

Marko edited this page Dec 26, 2020 · 26 revisions

This is part of the Getting Started guide. Please read the full guide if you have trouble.


You will need the following tools:

You will find platform specific instructions to install these below.

Windows

Option 1: Windows subsystem for Linux (Windows 10 only)

Make sure to install the Windows Subsystem for Linux.
If you haven't installed it yet, you can follow Microsoft's guide. For installation instructions, refer to the instructions for Linux for the respective distribution.

Option 2: MSYS2

Install MSYS2.
In an MSYS2 shell, run:

pacman -S make cmake git bison flex mingw-w64-x86_64-gcc mingw-w64-x86_64-llvm mingw-w64-x86_64-clang mingw-w64-x86_64-lld

You'll need to use the MSYS MinGW 64-Bit shell when compiling the library or nxdk-powered applications.
If you want to execute a command within a command line or PowerShell window, use the following command:

C:\msys64\msys2_shell.cmd -no-start -here -defterm -mingw64 -c <command>

Make sure to replace C:\msys64\ with the location of your MSYS2 installation, and <command> with the command you want to run, i.e make.

macOS

You can install the prerequisites with Homebrew, this should do the job (Xcode ships with make, bison and flex):

brew install llvm cmake

Linux

Ubuntu

sudo apt install build-essential cmake flex bison clang lld git llvm

Note: On older versions of Ubuntu, you may need to install lld via a LLVM nightly package instead.
Note: On Ubuntu, LLVM 6 will not provide llvm-lib correctly. See https://github.com/XboxDev/nxdk/issues/196 for solutions.

Debian

sudo apt install build-essential cmake flex bison clang llvm lld git

openSUSE

sudo zypper install make cmake clang bison flex lld git llvm-devel

Alpine

apk add build-base cmake clang bison flex lld git llvm