SFML community forums

Help => General => Topic started by: Akaras on October 26, 2013, 06:38:27 pm

Title: Programm could only load image with administrator permission
Post by: Akaras on October 26, 2013, 06:38:27 pm
Hi,
When I load an image by using "loadFromFile("file.jpg")" the programm outputs to the console:
Quote
Failed to load image "image.jpg". Reason : Unable to open file
When I first compile the programm and then start it manually with administrator permissions it works perfectly.
The image and the executable are in the same directory which is not protected..

So is there a way to either do it without administrator permissions or how can I let VS2013 directly start the compiled exe with permission..
Title: Re: Programm could only load image with administrator permission
Post by: Ixrec on October 26, 2013, 08:28:01 pm
That's bizarre.  What folder are they in?  Is the image set to read-only (check Properties)?

Having VS start it with admin privileges (if it has that feature) won't be a real solution, unless you never want to distribute this program to any other computers.
Title: Re: Programm could only load image with administrator permission
Post by: Akaras on October 27, 2013, 12:33:58 am
My Project is in the default Path..
C:\Users\akaras\Documents\Visual Studio 2013\Projects
And it is not set to read-only.. I already checked that..
I want to distribute this programm on my website, so it needs to work without administrator permission..