# Installation on Unix/Linux

The installation process of Oat++ is simple and straightforward. If you have all prerequisites installed, jump straight to Install Oat++.

# Prerequisites

  • Git
  • C++ compiler supporting C++ version >= 11.
  • Make
  • CMake version >= 3.1

For details see Installing Prerequisites.

# Install Oat++

Once all prerequisites installed - install Oat++:

$ git clone https://github.com/oatpp/oatpp.git
$ cd oatpp/

$ mkdir build && cd build

$ cmake ..
$ make install

# Installation CMake options:

Option Default Description
CMAKE_BUILD_TYPE Debug Build type.
OATPP_DISABLE_ENV_OBJECT_COUNTERS OFF If ON, do not count oatpp objects (do not detect memory-leaks). This will increase performance.
Note: DO NOT use this flags to build/run application tests, as tests won't detect memory-leaks.
OATPP_DISABLE_POOL_ALLOCATIONS OFF If ON, do not use oatpp memory-pools.
OATPP_COMPAT_BUILD_NO_THREAD_LOCAL OFF Build without thread_local feature. See #81.

# Installing Prerequisites

# Ubuntu

Install prerequisites:

$ apt-get install git
$ apt-get install cmake
$ apt-get install build-essential

# CentOS

Install prerequisites:

$ yum install git
$ yum install cmake
$ yum install gcc gcc-c++ make
$ yum install libatomic

# Fedora

Install prerequisites:

$ yum install git
$ yum install cmake
$ yum install gcc gcc-c++ make
$ yum install libatomic

# Alpine

Install prerequisites:

$ apk add git
$ apk add cmake
$ apk add g++
$ apk add make

# Patches

Some platforms may require patching of build-scripts to properly install oatpp. You may find what you need in the following repos:

  • OpenWRT - see Oat++ OpenWRT feed containing build-scripts, options and patches for applications, modules and libraries provided by Oat++.
  • NixOS - see Oat++ NixOS feed - collection of patches to properly install oatpp on NixOS. Special thanks to David Ibbitson - dibbitson.