Hello!
I have downloaded SFML for my Visual C++ 2010 Express, and all works as expected... until I try to use the sf::Texture loadFromFile() function! Here is my code:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "Here is a shape:");
sf::Texture texture;
if (!texture.loadFromFile("shape.png"))
return -1;
sf::Sprite sprite(texture);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(sprite);
window.display();
}
return 0;
}
This is what a message box says when I try to run the code (sfml.exe is my app's name):
Unhandled exception at 0x73231f34 in sfml.exe: 0xC0000005: Access violation reading location 0x00361000.