I am trying to load an image from file to use as a sprite, this worked in debug but not the release
cout<<"start";
// Load the sprite image from a file
sf::Image Image;
cout<<"a"<<endl;
if (!Image.LoadFromFile("playerblock.png")){
cout<<"b"<<endl;
return EXIT_FAILURE;
}
the error message reads
" Fail to load image "erblock.png * " .Reason : Unable to open file "
Here is an image for clarification.
(http://i.imgur.com/89vPBla.jpg)
Just to reiterate, this works in the debug but I am getting this error in the release version.
I have had a quick look through but I can't find a similar error. I would really appreciate some help on this one
#include "StdAfx.h"
using namespace std;
int main(){
sf::Image Image;
if (!Image.LoadFromFile("playerblock.png")){
return EXIT_FAILURE;
}
}
is the minimum complete example, it complains with out StdAfx.h which only contains:
#include <SFML/Graphics.hpp>
The image opens fine in other programs and in the debug version, the problem is still persisting.