You have to use a sf::RenderWindow rather than a sf::Window, if you plan on drawing primitives provided by SFML, such as sf::RectangleShape or sf::Sprite.
sf::RenderWindow
sf::Window
sf::RectangleShape
sf::Sprite