mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-30 02:39:17 -05:00
Updated build instructions when working with Homebrew
@ -4,6 +4,10 @@ This guide has been written using the following software:
|
|||||||
- OSX El Capitan (10.11.3)
|
- OSX El Capitan (10.11.3)
|
||||||
- Xcode 7.2.1 (7C1002)
|
- Xcode 7.2.1 (7C1002)
|
||||||
|
|
||||||
|
Homebrew build option tested on:
|
||||||
|
- macOS Big Sur (11.3.1)
|
||||||
|
- Xcode 12.5
|
||||||
|
|
||||||
_Steps:_
|
_Steps:_
|
||||||
|
|
||||||
1) Get a Mac with OSX version 10.11.3.
|
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:
|
- 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:
|
- 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`:
|
- 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.
|
You may get an error, complaining that the `pkg-config` command was not found. You can use `brew install pkgconfig` to fix that.
|
||||||
|
|||||||
Reference in New Issue
Block a user