SFML community forums

Help => General => Topic started by: naofumi on February 18, 2015, 04:33:58 am

Title: Error for installing/setting up SFML
Post by: naofumi 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.


Title: Re: Error for installing/setting up SFML
Post by: Jesper Juhl 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.