mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
I've fixed some errors
@ -1,39 +1,31 @@
|
||||
**This section is still in construction; it may not works!**
|
||||
|
||||
To build your raylib game for Linux you need to download raylib git repository and install some dependencies. raylib already comes with ready-to-use makefiles to compile source code and examples.
|
||||
To build your raylib game for GNU/Linux you need to download raylib git repository and install some dependencies. raylib already comes with ready-to-use makefiles to compile source code, examples and templates that you can use on your projects.
|
||||
|
||||
This guide is for Ubuntu/Debian distros, that use APT as package manager; it is tested on Ubuntu 14.04.
|
||||
|
||||
# Install basis and useful packages
|
||||
|
||||
You have to install GCC compilers, Make tool and git (for download raylib repository):
|
||||
You have to install GCC compilers, Make tool and git (for downloading raylib repository):
|
||||
|
||||
sudo apt install build-essential git
|
||||
|
||||
# Install raylib
|
||||
# Compile raylib
|
||||
## Install raylib dependencies
|
||||
raylib requires GLFW3 (Windows and input management) and OpenAL Soft (audio system management). Just install them:
|
||||
|
||||
raylib requires some libraries on Linux, those libraries are GLFW3 (Windows and input management) and OpenAL Soft (audio system management). Just install them:
|
||||
sudo apt install libopenal1 libopenal-dev
|
||||
|
||||
## Install GLFW3
|
||||
This library depends on some other libraries:
|
||||
GLFW3 depends on some other libraries:
|
||||
|
||||
sudo apt install mesa-common-dev libx11-dev libxrandr-dev libXi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev
|
||||
|
||||
Now, you need to download GLFW3 from git and build it (you also need cmake tool; if you have not, just do: `sudo apt install cmake`):
|
||||
Now, you need to download GLFW3 from sources and build it (you also need cmake tool; if you have not, just do: `sudo apt install cmake`):
|
||||
|
||||
git clone https://github.com/glfw/glfw.git glfw
|
||||
cd glfw
|
||||
cmake .
|
||||
sudo make install
|
||||
|
||||
## Installing OpenAL Soft
|
||||
|
||||
sudo apt install libopenal1 libopenal-dev
|
||||
|
||||
## Compiling raylib source code
|
||||
|
||||
First, you need to download raylib repository from git; after you can compile raylib for GNU/Linux:
|
||||
## Compile raylib source code
|
||||
First, you need to download raylib repository from git; after you can compile it for GNU/Linux:
|
||||
|
||||
git clone https://github.com/raysan5/raylib.git raylib
|
||||
cd raylib/src/
|
||||
@ -49,15 +41,7 @@ If you want, you can move the library and header in standards directories:
|
||||
sudo mkdir /usr/local/include/raylib # If there is not the directory
|
||||
sudo cp raylib.h /usr/local/include/raylib/raylib.h
|
||||
|
||||
**WARNING:** if you move raylib in standard directories, you must include the library with `#include <raylib/raylib.h>` in your projects. When you compile it on other operating systems, they don't find the raylib header. This is a solution:
|
||||
|
||||
#ifdef __gnu_linux__
|
||||
#include <raylib/raylib.h>
|
||||
#else
|
||||
#include <raylib.h>
|
||||
#endif
|
||||
|
||||
###Compiling raylib examples **(WIP)**
|
||||
# Compile raylib examples
|
||||
Just move to folder `raylib/examples/` and run:
|
||||
|
||||
make PLATFORM=PLATFORM_DESKTOP
|
||||
|
||||
Reference in New Issue
Block a user