I had sfml 2.0 running from the compiled source. I noticed that the sfml 2.0 release candidate was posted so I thought I would update and I am having trouble compiling a simple example, which I assume is a problem linking.
This is the error I get
main.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>C:\Users\Nolan\documents\visual studio 2010\Projects\mapmaker\Debug\mapmaker.exe : fatal error LNK1120: 1 unresolved externals
and this is all the code I am using
#include <iostream>
#include <SFML/Graphics.hpp>
using std::cout;
using std::endl;
int main()
{
sf::RenderWindow window(sf::VideoMode(300, 200), "SFML works!");
sf::Text text("Hello SFML");
while(window.isOpen())
{
sf::Event event;
while(window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
{
window.close();
}
}
window.clear();
window.draw( text );
window.display();
}
return 0;
}
Everything compiles except the ' window.draw( text ); ' line so there is something wrong there but I am unsure what it is. The new release came with precompiled .dll's so I didn't compile anything with cmake or Nmake. Also I deleted all old sfml related stuff so there shouldn't be a problem with that. This is visual studio 2010.