I've fixed some errors

LelixSuper
2016-03-14 16:03:36 +01:00
parent e8f118e601
commit a9a033e354

@ -1,39 +1,31 @@
**This section is still in construction; it may not works!** 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.
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.
This guide is for Ubuntu/Debian distros, that use APT as package manager; it is tested on Ubuntu 14.04. 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 # Install basis and useful packages
You have to install GCC compilers, Make tool and git (for downloading raylib repository):
You have to install GCC compilers, Make tool and git (for download raylib repository):
sudo apt install build-essential git sudo apt install build-essential git
# Install raylib # Compile raylib
## Install raylib dependencies ## 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 GLFW3 depends on some other libraries:
This library 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 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 git clone https://github.com/glfw/glfw.git glfw
cd glfw cd glfw
cmake . cmake .
sudo make install sudo make install
## Installing OpenAL Soft ## Compile raylib source code
First, you need to download raylib repository from git; after you can compile it for GNU/Linux:
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:
git clone https://github.com/raysan5/raylib.git raylib git clone https://github.com/raysan5/raylib.git raylib
cd raylib/src/ 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 mkdir /usr/local/include/raylib # If there is not the directory
sudo cp raylib.h /usr/local/include/raylib/raylib.h 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: # Compile raylib examples
#ifdef __gnu_linux__
#include <raylib/raylib.h>
#else
#include <raylib.h>
#endif
###Compiling raylib examples **(WIP)**
Just move to folder `raylib/examples/` and run: Just move to folder `raylib/examples/` and run:
make PLATFORM=PLATFORM_DESKTOP make PLATFORM=PLATFORM_DESKTOP