- Clone repository
git clone https://github.com/raysan5/raylib.git raylib && cd raylib/src - Compile library to be dynamically linked
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED - Install library
sudo make install RAYLIB_LIBTYPE=SHARED # Dynamic shared version. - Set CPATH
export CPATH=/usr/local/lib:/usr/local/include(Required by compiler to find the shared library) - Compile Source Code
clang -lraylib -o hello hello.c(Using Basic Window example) - Set LD_LIBRARY_PATH
LD_LIBRARY_PATH=$CPATH(Required by executable to find the shared library) - Run executable
./hello
Last active
April 10, 2020 22:54
-
-
Save last-ent/46fe96447a7ead7dbe3e9daf714222c3 to your computer and use it in GitHub Desktop.
How to configure RayLib with C for Layman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment