Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Default path differing between debugger and exe.  (Read 1474 times)

0 Members and 1 Guest are viewing this topic.

NameUser

  • Newbie
  • *
  • Posts: 30
    • View Profile
Default path differing between debugger and exe.
« on: April 11, 2013, 10:38:49 pm »
For one, I'm sorry if I shouldn't post this here since it's not directly related to SFML. However, the issue is based off of SFML's image file loading.

I'm using Microsoft Visual C++ 2010 Express. When I build and then run the built exe, the program starts its search path from the exe's location, and finds all of the images and other files in the same folder with it. However, when I try to run it via the debugger, the search path begins at C: and every single external file fails to load.

Does any have any idea why this is? Does it have something to do with SFML's file loading, or is it completely unrelated? Any ideas on how to fix this?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Default path differing between debugger and exe.
« Reply #1 on: April 11, 2013, 10:45:56 pm »
Project settings > Debugging > Working directory > put $(TargetDir)
Laurent Gomila - SFML developer

NameUser

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Default path differing between debugger and exe.
« Reply #2 on: April 12, 2013, 12:55:02 am »
Project settings > Debugging > Working directory > put $(TargetDir)
Ahhh, thank you so much. For such a simple thing, I was having so much trouble getting this solved because trying to google it gets you so many other things due to the particular key words you have to use such as path and debug.

 

anything