title: C++ Visual Studio 2012 Linker Errors?
body: <p>I'm pretty new to C++ and I was setting up a project with SFML, which was working fine, I have no code issues according to Visual Studio, but when I debug I get these error messages:</p>
  
  <blockquote>
    <p>Error 1   error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: __thiscall sf::String::String(char
    const *,class std::locale const &amp;)"
    (_<em>imp</em>??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function
    "public: static void __cdecl Game::Start(void)"
    (?Start@Game@@SAXXZ)  c:\Users\Harley\cppprojects\Pong\PongSFML\PongSFML\Game.obj PongSFML</p>
    
    <p>Error 2   error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: _<em>thiscall sf::String::~String(void)"
    (</em>_imp_??1String@sf@@QAE@XZ) referenced in function "public: static
    void __cdecl Game::Start(void)"
    (?Start@Game@@SAXXZ)  c:\Users\Harley\cppprojects\Pong\PongSFML\PongSFML\Game.obj PongSFML</p>
    
    <p>Error 3   error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: _<em>thiscall
    sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)"
    (</em>_imp_??0VideoMode@sf@@QAE@III@Z) referenced in function "public:
    static void __cdecl Game::Start(void)"
    (?Start@Game@@SAXXZ)  c:\Users\Harley\cppprojects\Pong\PongSFML\PongSFML\Game.obj 
    PongSFML</p>
    
    <p>Error 4   error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: void _<em>thiscall
    sf::Window::create(class sf::VideoMode,class sf::String const
    &amp;,unsigned int,struct sf::ContextSettings const &amp;)"
    (</em>_imp_?create@Window@sf@@QAEXVVideoMode@2@ABVString@2@IABUContextSettings@2@@Z)
    referenced in function "public: static void __cdecl Game::Start(void)"
    (?Start@Game@@SAXXZ)  c:\Users\Harley\cppprojects\Pong\PongSFML\PongSFML\Game.obj PongSFML</p>
    
    <p>Error 5   error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: void _<em>thiscall
    sf::Window::close(void)" (</em>_imp_?close@Window@sf@@QAEXXZ) referenced
    in function "public: static void __cdecl Game::Start(void)"
    (?Start@Game@@SAXXZ)  c:\Users\Harley\cppprojects\Pong\PongSFML\PongSFML\Game.obj PongSFML</p>
    
    <p>Error 6   error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: bool _<em>thiscall
    sf::Window::pollEvent(class sf::Event &amp;)"
    (</em>_imp_?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in
    function "private: static void __cdecl Game::GameLoop(void)"
    (?GameLoop@Game@@CAXXZ)   c:\Users\Harley\cppprojects\Pong\PongSFML\PongSFML\Game.obj PongSFML</p>
    
    <p>Error 7   error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: void _<em>thiscall
    sf::Window::display(void)" (</em>_imp_?display@Window@sf@@QAEXXZ)
    referenced in function "private: static void __cdecl
    Game::GameLoop(void)"
    (?GameLoop@Game@@CAXXZ)   c:\Users\Harley\cppprojects\Pong\PongSFML\PongSFML\Game.obj PongSFML</p>
    
    <p>Error 8   error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: _<em>thiscall sf::Color::Color(unsigned
    char,unsigned char,unsigned char,unsigned char)"
    (</em>_imp_??0Color@sf@@QAE@EEEE@Z) referenced in function "private:
    static void __cdecl Game::GameLoop(void)"
    (?GameLoop@Game@@CAXXZ)   c:\Users\Harley\cppprojects\Pong\PongSFML\PongSFML\Game.obj PongSFML</p>
    
    <p>Error 9   error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: void _<em>thiscall
    sf::RenderTarget::clear(class sf::Color const &amp;)"
    (</em>_imp_?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in
    function "private: static void __cdecl Game::GameLoop(void)"
    (?GameLoop@Game@@CAXXZ)   c:\Users\Harley\cppprojects\Pong\PongSFML\PongSFML\Game.obj PongSFML</p>
    
    <p>Error 10  error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: _<em>thiscall
    sf::RenderWindow::RenderWindow(void)"
    (</em>_imp_??0RenderWindow@sf@@QAE@XZ) referenced in function "void
    __cdecl `dynamic initializer for 'private: static class sf::RenderWindow Game::<em>mainWindow''(void)"
    (??</em>_E?_mainWindow@Game@@0VRenderWindow@sf@@A@@YAXXZ) c:\Users\Harley\cppprojects\Pong\PongSFML\PongSFML\Game.obj PongSFML</p>
    
    <p>Error 11  error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: virtual _<em>thiscall
    sf::RenderWindow::~RenderWindow(void)"
    (</em>_imp_??1RenderWindow@sf@@UAE@XZ) referenced in function "void
    __cdecl `dynamic atexit destructor for 'private: static class sf::RenderWindow Game::<em>mainWindow''(void)"
    (??</em>_F?_mainWindow@Game@@0VRenderWindow@sf@@A@@YAXXZ) c:\Users\Harley\cppprojects\Pong\PongSFML\PongSFML\Game.obj PongSFML</p>
    
    <p>Error 12  error LNK1120: 11 unresolved
    externals c:\Users\Harley\cppprojects\Pong\PongSFML\Debug\PongSFML.exe    1   1   PongSFML</p>
  </blockquote>
  
  <p>I've already done quite a bit of research to try to fix this, but no suggestions worked or changed anything at all. I checked through my additional dependencies and I didn't make any spelling errors:</p>
  
  <p>sfml-main-d.lib;sfml-audio-d.lib;sfml-system-d.lib;sfml-window-d.lib;sfml-graphics-d.lib;</p>
  
  <p>My release dependencies:</p>
  
  <p>sfml-system.lib;sfml-window.lib;sfml-graphics.lib;sfml-audio.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;</p>
  
  <p>Once again, I'm new to C++ so I may be doing something incredibly stupid. I don't think my source code has anything to do with it, however someone suggested that I add</p>
  
  <pre><code>#pragma comment(lib, "sfml-main-d.lib")
  #pragma comment(lib, "sfml-system-d.lib")
  #pragma comment(lib, "sfml-window-d.lib")
  #pragma comment(lib, "sfml-graphics-d.lib")
  </code></pre>
  
  <p>above my main method, so I did.</p>
  
  <p>Does anyone know what I'm doing wrong?</p>
  
  <p>Thanks</p>