From 9833fe28187fc06272e69244b93438097f5ff3cb Mon Sep 17 00:00:00 2001 From: DanielG <42619318+GoldenbergDaniel@users.noreply.github.com> Date: Sun, 23 May 2021 18:47:18 -0400 Subject: [PATCH] Updated build instructions when working with Homebrew --- Working-on-macOS.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Working-on-macOS.md b/Working-on-macOS.md index 35c2619..5216af1 100644 --- a/Working-on-macOS.md +++ b/Working-on-macOS.md @@ -4,6 +4,10 @@ This guide has been written using the following software: - OSX El Capitan (10.11.3) - Xcode 7.2.1 (7C1002) +Homebrew build option tested on: +- macOS Big Sur (11.3.1) +- Xcode 12.5 + _Steps:_ 1) Get a Mac with OSX version 10.11.3. @@ -16,15 +20,19 @@ _Steps:_ - If you don't want to build it yourself, install Homebrew by executing the following command in Terminal.app: ``` - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ``` - Once Homebrew is installed, run the following command in Terminal: ``` - brew install raylib +brew install raylib ``` - raylib installs a pkg-config file, which describes the necessary compilation and linker flags to use it with `yourgame`: ``` -cc yourgame.c `pkg-config --libs --cflags raylib` +cc yourgame.c `pkg-config --libs --cflags raylib` -o YourGame +``` +- If the build fails, you may need to run the following command with the required frameworks +``` +cc yourgame.c -framework IOKit -framework Cocoa -framework OpenGL `pkg-config --libs --cflags raylib` -o YourGame ``` You may get an error, complaining that the `pkg-config` command was not found. You can use `brew install pkgconfig` to fix that.