These libraries (SDL, SFML, Allegro) work well for a
lot of people. Have you considered the option that if they are not working for you then maybe
you are doing something wrong on
your end?
Personally I'm very happy with SFML; it works very nicely for my own projects. I've also used SDL quite a bit in the past and was very happy with it (although I didn't like the fact of it being a C API). Allegro I've never used, but I've heard lots of people say nice things about it and I certainly have no reason to believe it doesn't work.
Now, let's focus on SFML. Let's take an example straight out of the
SFML 2.1 tutorials (which you should read by the way - they are very good). By combining the first example of the
Drawing 2D stuff and the
Shapes tutorials we get something like this:
#include <SFML/Graphics.hpp>
int main()
{
// create the window
sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
sf::CircleShape shape(50);
// set the shape color to green
shape.setFillColor(sf::Color(100, 250, 50));
// run the program as long as the window is open
while (window.isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
sf::Event event;
while (window.pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window.close();
}
// clear the window with black color
window.clear(sf::Color::Black);
// draw everything here...
window.draw(shape);
// end the current frame
window.display();
}
return 0;
}
Let's try and compile it, shall we?
$ clang++ -I/usr/local/include -L/usr/local/lib -L/usr/lib -lsfml-window -lsfml-system -lsfml-graphics ~/example.cc
To not much surprise, it builds just fine.
Now let's try to run it and see what we get
$ ./a.out
as expected we get a window with a green circle:
...
So, what exactely doesn't work?