User Tools

Site Tools


proton:linux_setup

This is an old revision of the document!


Compiling the examples for Linux

In order to build the examples on Linux you first need some dependencies installed on your system. All of the needed dependencies are common in Linux distributions so you'll probably find everything needed through your distribution's package manager. The name of the packages vary slightly from distribution to another so you'll might need to search for the specific names a little.

The build scripts available for Linux use cmake so you have to have that installed. In addition you need a bunch of other usual build tools like gcc, libc, make and possibly others. The Linux version uses SDL so you'll also need some development packages for SDL. It's usually called SDL-devel and in order to hear sounds you'll also need SDL_mixer-devel. This is not a complete list of the dependencies so you might need to try if the building succeeds and if not then install some more dependencies. Sometimes the build process outputs a sane error message that tells what is missing, sometimes it doesn't. Good luck :-P

Compiling RTBareBones

This is the process I follow when compiling the examples. You may vary this to your needs if you want since cmake is quite flexible in what it can do. But it's a safe bet to follow these quidelines if you are not yet too familiar with cmake.

It's a good practice to do so called out-of-source builds. This way the compiled object and other files don't pollute the source directory but instead they are put to a directory of their own. With cmake out-of-source builds are really easy.

So fire up your console and let's start typing.

First let's make a directory where the building will happen.

cd RTBareBones/linux
mkdir build

Then enter that directory, call cmake and then make.

cd build
cmake ..
make

The argument to cmake (..) tells where it's supposed to search for the CMakeLists.txt build file that tells it what to do. If you make your build directory somewhere else than shown above you would need to adjust this argument accordingly but other than that the process should be exactly the same as here.

If the build finishes without errors you'll end up with a binary called rtbarebones in the build directory. In the process cmake has created a bunch of subdirectories and files but you don't need to care about these - let cmake do its stuff.

In order to run the compiled program you'll need to change to the directory which contains the images and other resources and execute the binary from there. This way the program can find the resources and load them correctly.

cd ../../bin
../linux/build/rtbarebones

Now you should see the application window.

Building RTPack

update_media

debug builds

IDEs

proton/linux_setup.1330255296.txt.gz · Last modified: 2012/02/26 11:21 by aki