Hello, i've been experiencing this frustrating error for hours now, and I can't seem to fix it!
Here's the code (using the sample code from the site)
#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;
}
here's the error.
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::String(char const *,class std::locale const &)" (__imp_??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main c:\Users\Ricky\documents\visual studio 2012\Projects\sfm-app\sfm-app\main.obj sfm-app
Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::~String(void)" (__imp_??1String@sf@@QAE@XZ) referenced in function _main c:\Users\Ricky\documents\visual studio 2012\Projects\sfm-app\sfm-app\main.obj sfm-app
Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main c:\Users\Ricky\documents\visual studio 2012\Projects\sfm-app\sfm-app\main.obj sfm-app
Error 4 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::close(void)" (__imp_?close@Window@sf@@QAEXXZ) referenced in function _main c:\Users\Ricky\documents\visual studio 2012\Projects\sfm-app\sfm-app\main.obj sfm-app
Error 5 error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QBE_NXZ) referenced in function _main c:\Users\Ricky\documents\visual studio 2012\Projects\sfm-app\sfm-app\main.obj sfm-app
Error 6 error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (__imp_?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main c:\Users\Ricky\documents\visual studio 2012\Projects\sfm-app\sfm-app\main.obj sfm-app
Error 7 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::display(void)" (__imp_?display@Window@sf@@QAEXXZ) referenced in function _main c:\Users\Ricky\documents\visual studio 2012\Projects\sfm-app\sfm-app\main.obj sfm-app
Error 8 error LNK1120: 7 unresolved externals c:\users\ricky\documents\visual studio 2012\Projects\sfm-app\Debug\sfm-app.exe sfm-app
screenshots:
help and suggestions are much appreciated thanks for your time!
note: using sfml 2.1, vs 2012 express