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

Author Topic: Can't load files from Visual Studio  (Read 1388 times)

0 Members and 1 Guest are viewing this topic.

KraXarN

  • Newbie
  • *
  • Posts: 12
  • Stuffs and things
    • View Profile
Can't load files from Visual Studio
« on: June 16, 2016, 05:34:36 pm »
Hello!

So just started using SFML, but when I try to load a file and debugging from Visual Studio 2015 it just gives an error that it "couldn't open stream". When launching the exe file directly, it can load the asset and use it just fine. No clue what's going on.

Thanks!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Can't load files from Visual Studio
« Reply #1 on: June 16, 2016, 05:59:43 pm »
The working directory is by default set next to the project file when starting from inside of Visual Studio, but when you start the exe directly, the working directory is set to where the exe is located.
You can change the working directory in the project settings if wanted.
« Last Edit: June 16, 2016, 07:35:23 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

KraXarN

  • Newbie
  • *
  • Posts: 12
  • Stuffs and things
    • View Profile
Re: Can't load files from Visual Studio
« Reply #2 on: June 16, 2016, 06:02:48 pm »
Yup, that was it! Thanks a lot :)