Skip to content
This repository has been archived by the owner on Feb 16, 2019. It is now read-only.

Tutorials

Amir Hossein Seyhani edited this page Apr 12, 2018 · 1 revision

Compile RSDL Library

RSDL library contains two files: rsdl.hpp and rsdl.cpp. In order to use this library you have to compile rsdl.cpp and include rsdl.hpp in your codes.

Mac OS users

At first you have to uncomment lines 9, 10 and 11 in rsdl.hpp. Also comment lines 4, 5 and 6.
To compile rsdl.cpp on mac, you have to compile it with -framework option to include SDL2, SDL2_image and SDL2_ttf libraries.Run the following command:

  g++ [your cpp files] rsdl.cpp -framework SDL2 -framework SDL2_image -framework SDL2_ttf

Linux users

At first you have to uncomment lines 4, 5 and 6 in rsdl.hpp. Also comment lines 9, 10 and 11.
To compile rsdl.cpp on linux systems, you have to compile it with -l option to include SDL2, SDL2_image and SDL2_ttf libraries.Run the following command:

  g++ [your cpp files] rsdl.cpp -l SDL2 -l SDL2_image -l SDL2_ttf
Clone this wiki locally