SFML community forums

Help => General => Topic started by: SaturnElena on January 16, 2012, 01:42:56 am

Title: Simple code only works when not launched by VS10
Post by: SaturnElena on January 16, 2012, 01:42:56 am
so I made a simple show pic code and after you click its loads a diff img
the code is pretty much copy pasted from a tutorial

but when I run it from VS10  it just shows a black window
and when ran  from a win explorer it works no problem

what could cause this? :s

thank you  :lol:
Title: Simple code only works when not launched by VS10
Post by: Tex Killer on January 16, 2012, 03:13:27 am
When you run it from the VS, the current path is probably set to the project directory, but when you run it alone, the current path is the folder with the .exe file.

If you want to run it from VS, put the resources relative to that folder.
Title: Simple code only works when not launched by VS10
Post by: SaturnElena on January 16, 2012, 08:49:05 am
Thank you kindly
this solved my problem.

 :)