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

Author Topic: Not Able to us loadFromFile in SFML 2.2  (Read 700 times)

0 Members and 1 Guest are viewing this topic.

Benoy John

  • Newbie
  • *
  • Posts: 2
    • View Profile
Not Able to us loadFromFile in SFML 2.2
« on: June 23, 2015, 11:09:00 pm »
Hi,

I'm new to SFML and am trying out code from tutorial texts. I was able to create a simple circle using CircleShape. But when I modified the code to take png files using loadFromFile, it is not accepting. The output is a white screen with the console behind having garbage characters. I tried copying the png file to different locations as suggested by others in other queries (I'm using Visual Studio 2013 in Windows 8.1). But there was no luck. I gave the full path for the image. Tried putting it under Gamer/Gamer/Debug (Gamer is the project name). Still no luck.

Could someone please let me know where I went wrong.  :'(

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10817
    • View Profile
    • development blog
    • Email
Re: Not Able to us loadFromFile in SFML 2.2
« Reply #1 on: June 23, 2015, 11:13:54 pm »
You are probably linking the debug libs in release mode or the release libs in debug mode. Check out the official tutorial again. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Benoy John

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Not Able to us loadFromFile in SFML 2.2
« Reply #2 on: June 23, 2015, 11:29:46 pm »
Awesome! Thank you  :)  :)