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

Author Topic: [Solved] font.loadFromFile fails  (Read 1205 times)

0 Members and 1 Guest are viewing this topic.

Sakurazaki

  • Newbie
  • *
  • Posts: 31
  • `お嬢様を守ります!
    • MSN Messenger - sakurazaki.setsunita@gmail.com
    • View Profile
[Solved] font.loadFromFile fails
« on: May 25, 2013, 08:20:13 pm »
Hello,

This is the snippet of code im using to load font:

sf::Font        font;
font.loadFromFile("arcade.ttf");

I have put the font in the same folder of the executable.

When I compile the program i get this output: http://screencloud.net/v/b2xj

I execute the exe through explorer, double clicking the executable.

I've ensure both are in the same directory, the cwd of the program when executed is the same
as the font. Everything is fine but I still get that.

Any way to solve this problem?

Thanks!
« Last Edit: May 25, 2013, 08:39:40 pm by Sakurazaki »
こんな私も変われるのならもし変われるのなら白になる

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: font.loadFromFile fails
« Reply #1 on: May 25, 2013, 08:35:19 pm »
Don't use release libraries in debug mode (and vice versa).
Laurent Gomila - SFML developer

Sakurazaki

  • Newbie
  • *
  • Posts: 31
  • `お嬢様を守ります!
    • MSN Messenger - sakurazaki.setsunita@gmail.com
    • View Profile
Re: font.loadFromFile fails
« Reply #2 on: May 25, 2013, 08:39:29 pm »
Damn i forgot to add the -d to the lib includes.

Thanks, it was such an stupid error.
こんな私も変われるのならもし変われるのなら白になる