In their official tutorials it is said that to draw graphics on screen, i have to use RenderWindow instead of Window. But when i write sf:: RenderWindow window, error pops up saying that there is no RenderWindow in sf:: . I copy-pasted the code but it still does not works. What could possibly be the reason behind this ?

  • 1
    \$\begingroup\$ #include <SFML/Graphics.hpp> ? \$\endgroup\$
    – Alayric
    May 1, 2015 at 23:21
  • \$\begingroup\$ @Alayric yes. I was using #include <SFML/Window.hpp> instead of #include <SFML/Graphics.hpp>, and that was causing the problem. \$\endgroup\$
    – anonymous
    May 3, 2015 at 20:38

1 Answer 1


sf::Window is part of the SFML Window module but sf::RenderWindow is part of the SFML Graphics module. Hence you have to include SFML/Graphics.hpp in order to use it.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .