place
system("dir");
somewhere before you load it. It will print the current working directory to the console window along with the files/folders in that directory. That will be the directory that SFML will be trying to load the image from.
Then remove the system call and pretend like I never told you to use it.
Thanks for the reply, here is code:
int main()
{
system("dir");
sf::Texture tex;
if (!tex.loadFromFile("mirrorlakedawn.jpg")) {
return -1;
}
return 0;
}
And the outcome:
Volume in drive D is HDD7200
Volume Serial Number is 59E2-31ED
Directory of D:\VSProjects\2DEngineSFML\2DEngineSFML
02/25/2017 02:16 PM <DIR> .
02/25/2017 02:16 PM <DIR> ..
02/26/2017 10:12 AM 6,201 2DEngineSFML.vcxproj
02/25/2017 12:23 PM 3,246 2DEngineSFML.vcxproj.filters
02/25/2017 12:21 PM 165 2DEngineSFML.vcxproj.user
02/25/2017 02:19 PM <DIR> Debug
02/07/2017 03:37 PM 15,467 fire.png
02/25/2017 12:15 PM <DIR> middleware
02/07/2017 04:00 PM 510,916 mirrorlakedawn.jpg
12/04/2014 04:09 PM 440,832 openal32.dll
02/25/2017 12:15 PM <DIR> resources
02/11/2017 03:42 AM 1,014,272 sfml-audio-2.dll
02/11/2017 03:42 AM 916,992 sfml-graphics-2.dll
02/11/2017 03:42 AM 138,752 sfml-network-2.dll
02/11/2017 03:42 AM 53,760 sfml-system-2.dll
02/11/2017 03:42 AM 112,640 sfml-window-2.dll
02/26/2017 10:10 AM <DIR> source
02/24/2017 07:20 PM 980 UI_basicButtom.png
02/25/2017 02:06 PM <DIR> x64
12 File(s) 3,214,223 bytes
7 Dir(s) 276,529,680,384 bytes free
Failed to load image "Press any key to continue . . .
So the working directory is "D:\VSProjects\2DEngineSFML\2DEngineSFML" :
still nothing, "failed to load image"
thanks again