Hi everyone,
I know this question has been answered many times, but I'm still having trouble with getting my program to work correctly.
First the problem: I'm trying to load a texture from the disk into memory
sf::Texture texture;
texture.loadFromFile("image.png");
This should be relatively straight forward. However, I'm getting a crash as soon as I get to the second line. Along with the crash, my computer will sometimes beep a bunch, and print garbage to the standard output. If I'm lucky, I will see at the top of the console "Failed to load image 'image.png'", but the reason of failure is not displayed, and garbage is shown instead.
Example:
The directory I printed at the top of the console is just a test I wrote to make sure the current working directory is where I thought it was. I've made sure that the VS project has the working directory set to $(TargetDir) and I've made sure that the image is in the correct location.
In case it's relevant, I'm using Visual Studio 2012.
I've not been able to find a solution, so I hope you guys can help me.
Thanks a bunch!