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

Author Topic: Error when using LoadFromFile  (Read 1332 times)

0 Members and 1 Guest are viewing this topic.

Beehive

  • Newbie
  • *
  • Posts: 2
    • View Profile
Error when using LoadFromFile
« on: March 19, 2011, 11:10:21 pm »
Hi all,

I'm just new to SFML and managed to get a lot of tutorials to run for me so far. However, now I wanted to draw some Text, and whenever I try the following

Code: [Select]

// Load from a font file on disk
if (!MyFont.LoadFromFile("arial.ttf"))
{
   return EXIT_FAILURE;
}


i get this error:

Code: [Select]

1>testSFML.obj : error LNK2001: unresolved external symbol "private: static unsigned int * sf::Font::ourDefaultCharset" (?ourDefaultCharset@Font@sf@@0PAIA)


I'm using Visual Studio 2008 on x64 Win 7.

Can anyone hint me on what I am doing wrong?

Thanks and regards
Chris

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error when using LoadFromFile
« Reply #1 on: March 19, 2011, 11:13:59 pm »
You forgot to define SFML_DYNAMIC.
Laurent Gomila - SFML developer

Beehive

  • Newbie
  • *
  • Posts: 2
    • View Profile
Error when using LoadFromFile
« Reply #2 on: March 20, 2011, 10:55:21 am »
Arg, thanks a lot. I accidently switched from debug to release without noticing and was 100% sure I had defined it :)

 

anything