# Installing OR-Tools for C++ from Binary on MacOS

## Introduction

This guide explains how to install OR-Tools for C++ on MacOS.

Although these instructions might also work on other MacOS variants, we
have only tested them on machines meeting the following requirements:


- MacOS 13.0.1 (Ventura) Intel 64-bit (x86_64)
- MacOS 13.0.1 (Ventura) M1 (arm64)

<br />

## Prerequisites

The following sections describe the prerequisites for installing OR-Tools.

### Xcode Command Line Tools

You must install the *Xcode Command Line Tools* . To do so, open the
Terminal, found in `/Applications/Utilities/`, and enter:

    xcode-select --install

Click "Install" to download and install Xcode Command Line Tools. You don't need
to "Get Xcode" from the App Store. If you have a slow Internet connection, it
may take many minutes.

Verify that you've successfully installed Xcode Command Line Tools:

    xcode-select -p

You should see:

    /Library/Developer/CommandLineTools

## Installing OR-Tools

Take the following steps to install the OR-Tools library for C++:

Download and extract the binary distribution for your system:


- [MacOS Intel](https://github.com/google/or-tools/releases/download/v9.12/or-tools_x86_64_macOS-15.3.1_cpp_v9.12.4544.tar.gz)
- [MacOS M1](https://github.com/google/or-tools/releases/download/v9.12/or-tools_arm64_macOS-15.3.1_cpp_v9.12.4544.tar.gz)

<br />

## Validate your installation

To test your C++ installations, open a terminal window and navigate to
the directory where you unpacked the binary distribution. Then enter the
following command:


    make test

<br />

This runs a selection of examples for OR-Tools. If all the examples run
successfully, you are ready to
[get started with OR-Tools](https://developers.google.com/optimization/introduction/cpp).