0

As of right now, I am using full path to load a image via sf::Image. But I'm trying to use relative path, but it doesn't really work because the current working directory of the binary is at some weird directory. So I'm asking, how can I load an image using relative path via sf::Image::LoadFromFile(fileName)? I am trying to avoid absolute paths. I tried 'adding' the image files to the same directory as my source, but it doesn't seem to be working. Any help would be great guys.

dchhetri
  • 6,590
  • 4
  • 39
  • 55

1 Answers1

1

I'm asuming you're using SFML 2 because I had the same issue with SFML 2, but not with 1.6.

This topic on SFMLs site summed up the issue, with some solution. Apparently when SFML2 gets released as a framework we'll beable to link resources correctly again. Until then I'm still using absolute paths.

dotty
  • 38,389
  • 65
  • 144
  • 195