# Setting up 32blit examples on Mac M1

**URL:** <https://forums.pimoroni.com/t/setting-up-32blit-examples-on-mac-m1/20014>\
**Category:** C++\
**Created:** [August 11, 2022, 10:17am UTC](https://forums.pimoroni.com/t/setting-up-32blit-examples-on-mac-m1/20014 "2022-08-11T10:17:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bearmund](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@Bearmund](https://forums.pimoroni.com/u/Bearmund)\
**Post date:** [August 11, 2022, 10:17am UTC](https://forums.pimoroni.com/t/setting-up-32blit-examples-on-mac-m1/20014/1 "2022-08-11T10:17:12Z")

</div>

Hi folks, to compile the 32blit C++ examples on an M1 Macbook Air, I had to:

1. install Homebrew, instructions found at [https://brew.sh/](https://brew.sh/)

2. Install various useful tools:

`brew install git cmake gcc g++ sdl2`

1. download the 32blit repo; first, make a folder where you want it to download to & navigate to it. For example, I went to my home directory and typed:

```auto
mkdir mycode
cd mycode

```

and then I ran:

`git clone https://github.com/32blit/32blit-sdk`

1. Once it downloads the repo to your laptop, now you can navigate to the individual examples and compile to run/test on your laptop, ie.:

```auto
cd 32blit-sdk/examples
cd scrolly-tile
mkdir build
cd build
cmake ..
make

```

1. And finally, once"make" is done, you run the example \*.app created!

The “scrolly-tile”'s app you’ve just created is called “Rainbow Ascent.app”. So _theoretically_ you should be able to run it by typing the following while still in that “build” directory:

`./Rainbow Ascent.app/`

But despite having execute permissions I cannot do so, so instead I just:

1. Navigate to the build folder where you’ve compiled that new app (Rainbow Ascent.app) and double-click on it.

And now the compiled example will run! (I will update this post as I figure out the command line run issue).

Thanks to mikered for his “setting up on Linux” posting which helped me figure out how to do this for the Mac!
