TL:DR for anyone having an issue similar to this:
Ensure you're using the correct library for your project configuration. Debug should correspond to -d, Static to -s in the lib filenames.Don't be derpy like me, friends don't let friends mismatch library release configurations.
----------------------------------------------------------------------------------------------------
Greetings, I'm a new-comer to SFML, I work in the CG industry as a developer and I'm working with SFML for other academic purposes.
I'm having an interesting issue. The following code fails to load the texture in question. (The texture is a 128x32 png file with no transparency layer.) :
...
sf::Texture test;
sf::Sprite testSpr;
if(!test.loadFromFile("paddle.png")) {
cerr << "I'd like more debug info than this.";
return EXIT_FAILURE;
}
testSpr.setTexture(test);
...
paddle.png is a typical power of two texture. It is located in the working directory, which was set using VS2010's project debugging configuration. Even an execution from cmd within the appropriate working directory fails:
Checking the error stream reveals the following error (which makes no sense to me)
C:\Users\<ME>\Documents\Visual Studio 2010\Projects\pong\x64\Debug>Pong.exe 2> err.log
C:\Users\<ME>\Documents\Visual Studio 2010\Projects\pong\x64\Debug>type err.log
I'd like more debug info than this.
Failed to load image "
C:\Users\<ME>\Documents\Visual Studio 2010\Projects\pong\x64\Debug>
C:\Users\<ME>\Documents\Visual Studio 2010\Projects\pong\x64\Debug>dir paddle.png
Volume in drive C has no label.
Volume Serial Number is XXXX-XXXX
Directory of C:\Users\<ME>\Documents\Visual Studio 2010\Projects\pong\x64\Debug
07/03/2015 10:24 AM 424 paddle.png
1 File(s) 424 bytes
0 Dir(s) 902,470,395,904 bytes free
C:\Users\<ME>\Documents\Visual Studio 2010\Projects\pong\x64\Debug>
That's not a typo, there is only one quote character in the stream output for the lib error stream output. The string literal provided as argument is clearly not empty.
Anyone have any ideas?