0

I'm trying to setup a project, but IDE always returns:

Error logs:

Error    LNK2019    unresolved external symbol "public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function _main
Error    LNK2019    unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function _main
Error    LNK2019    unresolved external symbol "public: bool __thiscall sf::Window::isOpen(void)const " (?isOpen@Window@sf@@QBE_NXZ) referenced in function _main
Error    LNK2019    unresolved external symbol "public: void __thiscall sf::Window::display(void)" (?display@Window@sf@@QAEXXZ) referenced in function _main
Error    LNK2019    unresolved external symbol "public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z) referenced in function _main
Error    LNK2019    unresolved external symbol "public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function _main
Error    LNK2019    unresolved external symbol "public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0RenderWindow@sf@@QAE@VVideoMode@1@ABVString@1@IABUContextSettings@1@@Z) referenced in function _main
Error    LNK2019    unresolved external symbol "public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UAE@XZ) referenced in function _main
LNK1120    8 unresolved externals


What I know (od did):

  • Paths to headers and libraries are set correctly
  • Preprocessor definitions contains SFML_STATIC setting
  • Linker has got all needed paths to compile program properly (for debug and release)
  • I've copied SFML dll files to the solution folder

I tried to use different tutorials, but none of them solved the problem. Something is wrong with Linker, but what?
PS: Anything I write using SFML returns an error

RooTender
  • 1
  • 1
  • 2
  • Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Ken White Oct 19 '18 at 12:09

1 Answers1

0

PS: Solved! The problem was that I hadn't added any important dependencies. Libraries from SFML were looking for windows libs, but no path was defined.

RooTender
  • 1
  • 1
  • 2