-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could somebody add how to set up and build on Mac? #7
Comments
The In my case, I installed it under GLFW is a library that you can find here: https://www.glfw.org/ |
Thank you! I was rewatching all of the streams after the last one came out but my retinas were burning out faster than my brain so I must've missed that step. I did get it working manually but not in a deterministic enough way to post here as an answer. |
In case anyone needs the same level of handholding as me, he goes into this in detail from about the 20:30 minute mark of the video where he introduced raylib into the project. He creates a file export PKG_CONFIG_PATH=$HOME/opt/raylib/lib/pkgconfig/ He then executes this script before the build script with the command thus: source ~/opt/raylib.env && ./build.sh But I must still be missing a detail because on my Mac I then get this output from
I can get it to build manually from the commandline like this: nn.h % clang -O3 -Wall -Wextra -I./thirdparty/ -I/Users/hippietrail/opt/raylib/include -o xor xor.c -lm -L/Users/hippietrail/opt/raylib/lib -lglfw -lraylib -ldl -lpthread For some reason I'm now using this version of #!/bin/sh
set -xe
CFLAGS="-O3 -Wall -Wextra -I./thirdparty/"
LIBS="-lm"
clang $CFLAGS -o adder_gen adder_gen.c $LIBS
clang $CFLAGS `pkg-config --cflags raylib` -o xor xor.c $LIBS -lglfw `pkg-config --libs raylib` -ldl -lpthread
clang $CFLAGS `pkg-config --cflags raylib` -o gym gym.c $LIBS -lglfw `pkg-config --libs raylib` -ldl -lpthread
clang $CFLAGS `pkg-config --cflags raylib` -o img2nn img2nn.c $LIBS -lglfw `pkg-config --libs raylib` -ldl -lpthread |
I installed cmake, built and installed raylib into
~/opt/raylib/
, and built pkg-config but reached a "local minima" down the rabbit hole.pkg-config doesn't know anything about raylib so just running
./build.sh
from this point doesn't work:At this branch of the rabbit hole I don't know how to make pkg-config know about raylib so I tried to manually construct a working commandline but don't really know what I'm doing. For instance:
I figured this is not somewhere
~
works and got further:I'm assuming at this point glfw is a free OpenGL library that Linux comes with and macOS does not.
If I figure this out myself I'll post my answer. But if somebody who actually knows what they're doing on macOS can post the steps I'm sure I'm not the only dummy who'll benefit.
The text was updated successfully, but these errors were encountered: