SFML community forums
Help => General => Topic started by: betawarz on December 17, 2013, 01:00:41 am
-
I'm compiling code with Visual Studio 2013 and SFML 2.1. The code compiles, and runs, but Texture::loadFromFile always returns false. I've tried feeding it a relative path to the working directory, an absolute path directory to a png file, and neither seem to work. Is there a way I can see exactly what it's trying to load or the error message as to why it's failing? I can't figure out how to use sf::err() to read error messages.
Thanks!
-
If not redirected sf::err will write to std::err which in Windows is usually the console. But if you build a window application and deactivate the console, you won't get to see the output. So you'll end up with the following three options:
- Build a command line application, so you'll get the console again.
- Redirect sf::err in code, see the documentation (http://www.sfml-dev.org/documentation/2.1/group__system.php#ga7fe7f475639e26334606b5142c29551f) for details.
- Redirect the std::cerr from outside, by starting the application from the command line and adding myexe.exe 2> err.log.