0

I just started a new C++ SFML project, I have an old one that works. I linked sfml like the tutorial said, so I think that isn't the problem. I even recreated the project and linked everything again...

Now this is the only code I have:

#include "StdAfx.h"

#include <SFML/Window.hpp>

int main()
{
    sf::Window window(sf::VideoMode(800, 600), "My window");

// run the program as long as the window is open
while (window.isOpen())
{
    // check all the window's events that were triggered since the last iteration of the loop
    sf::Event event;
    while (window.pollEvent(event))
    {
        // "close requested" event: we close the window
        if (event.type == sf::Event::Closed)
            window.close();
    }
}

return 0;
}

I am getting these errors:

NHTV Assignment.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::close(void)" (__imp_?close@Window@sf@@QAEXXZ) referenced in function _main

and then a couple more like these...

Does anyone know what the problem is here?

Thanks...

Jesper Klippel
  • 41
  • 1
  • 2
  • 7

0 Answers0