SFML Probs

Right now I am not sure what I am doing wrong. I followed the tutorial on the website, but my program isn't working. Here is a copy of my win-32 program.


}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// SFML Test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

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

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;



Please help!
Last edited on
What does "not working" mean? Does it not compile? Does it run but crash? Does it run but give you a blank screen?
there isn't anything wrong with the code so if it doesn't compile it is a issue with the compiler itself. my guess is that it is a problem i faced. did you download it from http://www.sfml-dev.org/
Last edited on
How did you setup your environment ? You need to properly direct your linker.
I'm pretty sure you're having a linker error, make sure you linked all the libraries right.
I am using the 2.1 with visual studio 2012. I did download it from http://www.sfml-dev.org/.

When I try to debug it... it gives me the message "cannot find the file specified." That doesn't make sense because under projects it has SFML TEST and under SFML TEST it has a debug folder, an ipch folder, a release folder, a folder with the title SFML TEST, a SQL server comp... thing, and a microsoft visual studio thing. Isn't that everything you need?


If the problem is a linker error. How can I make sure all the libraries are right?
Last edited on
closed account (N36fSL3A)
By checking project settings?
No, I mean how can I make sure that the settings that I have currently are correct. Is there anything I can compare them to?
Last edited on
Topic archived. No new replies allowed.