• 13
• 18
• 19
• 27
• 10

Basic SFML problem, graphics

This topic is 1397 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

#include <SFML/Window.hpp>
#include <iostream>

using namespace std;

int main()
{
sf::RenderWindow window;

window.create(sf::VideoMode(800, 600), "Myne");

while (window.isOpen())
{

sf::Event event;
while (window.pollEvent(event))
{

if (event.type == sf::Event::Closed)
{
window.close();
}

window.clear(sf::Color::Black);

window.display();
}

} 

ok so im going through the tutorials for SFML on visual studios for windows, trying to figure stuff out as i go. i did the test program, worked. i also did the first window tutorial program, also worked. im tinkering with the graphics stuff, so i can put something simple in my window. but im getting an error 'RenderWindow' is not a member of sf. any help would be appreciated!

here's my code, ive googled this and cant really find any answers that work

Share on other sites

Figured it out, was using the wrong header. didnt notice it had changed in the tutorial

Share on other sites

RenderWindow must be in Graphics.hpp if I'm not wrong