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

Author Topic: Error for installing/setting up SFML  (Read 722 times)

0 Members and 1 Guest are viewing this topic.

naofumi

  • Newbie
  • *
  • Posts: 1
    • View Profile
Error for installing/setting up SFML
« on: February 18, 2015, 04:33:58 am »
for the past 7 hours, i've looked through numerous videos on youtube, looked at the documentation, looked at other tutorails, everything.

But i still have errors when running the simple program:

#include "stdafx.h"
#include <SFML/Graphics.hpp>


int main()
{
   sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
   sf::CircleShape shape(100.f);
   shape.setFillColor(sf::Color::Green);

   while (window.isOpen())
   {
      sf::Event event;
      while (window.pollEvent(event))
      {
         if (event.type == sf::Event::Closed)
            window.close();
      }

      window.clear();
      window.draw(shape);
      window.display();
   }

   return 0;
}


heres the error:

Error   1   error LNK2019: unresolved external symbol "public: __thiscall sf::String::String(char const *,class std::locale const &)" (??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main   C:\Users\Flixstix\Documents\Visual Studio 2013\Projects\ConsoleApplication2\ConsoleApplication2\main.obj   ConsoleApplication2

there are numerous ones like that but instead of :"public__[insert]" instead.



Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Error for installing/setting up SFML
« Reply #1 on: February 18, 2015, 07:03:12 am »
1) thats a linker error.
2) the class it cannot find (sf::String) is in the 'system' module, so I'd guess you forgot to link that.

 

anything