From 274b989ea54f34d94c551c12eb77b22769930849 Mon Sep 17 00:00:00 2001 From: Angus Cheng Date: Mon, 7 Sep 2020 13:40:06 +0800 Subject: [PATCH] Updated Working on macOS (markdown) --- Working-on-macOS.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Working-on-macOS.md b/Working-on-macOS.md index 0caa4ac..32453ee 100644 --- a/Working-on-macOS.md +++ b/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: