Updated Working on macOS (markdown)

master
Angus Cheng 4 years ago
parent
commit
274b989ea5
1 changed files with 12 additions and 6 deletions
  1. +12
    -6
      Working-on-macOS.md

+ 12
- 6
Working-on-macOS.md

@ -72,12 +72,14 @@ Building statically means you can run this application on other machines with ea
## Here's the quick instructions:
1. From the command line: `export MACOSX_DEPLOYMENT_TARGET=10.9`
1. From the command line
```
export MACOSX_DEPLOYMENT_TARGET=10.9
```
2. Install XCode tools (don't forget to then update the tools in the Mac App Store after!)
````
xcode-select --install
````
3. Build raylib (Again, this is so the export line takes effect)
````
@ -86,18 +88,22 @@ cd raylib/src
make
````
You may do the otool check with the file in raylib/src/libs/osx/libraylib.a here if you like. (LC_VERSION_MIN_MACOSX should be version 10.4), and we're good!
copy raylib/src/libs/osx/libraylib.a to your project.
You may do the otool check with the file in raylib/src/libraylib.a here if you like. (LC_VERSION_MIN_MACOSX should be version 10.4), and we're good!
```
cp raylib/src/libraylib.a YOUR_PROJECTS_ROOT_FOLDER
```
4. Build your project!
```
clang -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL libraylib.a my_app.c -o my_app
clang -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL libraylib.a my_app.c -o my_app
```
Check for warnings! This can tell you if a library you're linking to was not built for OSX 10.9, in which case you'll need to rebuild that too.
Check otool one last time for the LC_VERSION_MIN_MACOSX version:
`otool -l my_app`
```
otool -l my_app
```
Last thing, let me show you something cool:

Loading…
Cancel
Save