Hi folks, to compile the 32blit C++ examples on an M1 Macbook Air, I had to:
-
install Homebrew, instructions found at https://brew.sh/
-
Install various useful tools:
brew install git cmake gcc g++ sdl2
- 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:
mkdir mycode
cd mycode
and then I ran:
git clone https://github.com/32blit/32blit-sdk
- 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.:
cd 32blit-sdk/examples
cd scrolly-tile
mkdir build
cd build
cmake ..
make
- 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:
- 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!