Posts

Showing posts with the label programming

SDL2 With Eclipse on Fedora22

On a Fedora22 system with Eclipse Mars version 4.5.1 this worked for me.

Create a new C++ project (File > New > C++ Project). You will need to pick a toolchain - Linux GCC.
If you want to use C++11 do the following:

Right click your Project under “Package Explorer” and select Properties.Select (C/C++ Build > Settings > GCC C++ Compiler > Dialect) Under “Language standard” select: "ISO C++11 (-std=c++0x)". Click Apply, then OK.
Configure Eclipse to use SDL2

At this step, I'd suggest to use the system's terminal/shell to find out or verify the existence/location of the necessary files/libraries for SDL2 on your system. 

First, if you want to find the location of the necessary libraries on your system, executing the following in the terminal will provide you with the "include" location and other compiler/preprocessor flags

$ sdl2-config --cflags
Similarly, to list the libraries/linker-flags

$ sdl2-config --libs
For example, on my Fedora22 (64bit…