(SFML 2.5.1 in VS2017) Many Unresolved External Symbol Errors












1















I'm trying to build a simple SFML program, but I keep getting these errors when I build the program. I tried Google, but the errors were always different than mine. I have SFML statically linked, here's my linker input:




winmm.lib;sfml-system-s.lib;ws2_32.lib;sfml-network-s.lib;opengl32.lib;gdi32.lib;sfml-window-s.lib;freetype.lib;sfml-graphics-s.lib




I have the SFML_STATIC line as well. I'm not quite sure what the problem is.



Code:



#ifndef __IOSTREAM_H
#include <iostream>
#endif

#include "data/movement.h"
#include <SFML/Graphics.hpp>


int main()
{
sf::RenderWindow mainw(sf::VideoMode(512, 512), "Window");

while (mainw.isOpen())
{
sf::Event winEvent;
while (mainw.pollEvent(winEvent))
{
if (winEvent.type == sf::Event::Closed)
{
mainw.close();
} else;
if (winEvent.type == sf::Event::KeyPressed)
{
if (winEvent.key.code == sf::Keyboard::Up)
{
upEvent();
}
else if (winEvent.key.code == sf::Keyboard::Down)
{
downEvent();
}
else if (winEvent.key.code == sf::Keyboard::Left)
{
leftEvent();
}
else if (winEvent.key.code == sf::Keyboard::Right)
{
rightEvent();
}
}
}
}

return 0;
}


Errors:




Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol __imp_RegQueryValueExW referenced in function "class sf::String __cdecl anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_EnumDisplaySettingsW referenced in function "public: static class sf::VideoMode __cdecl sf::priv::VideoModeImpl::getDesktopMode(void)" (?getDesktopMode@VideoModeImpl@priv@sf@@SA?AVVideoMode@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(VideoModeImpl.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_GetDC referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

Error LNK2001 unresolved external symbol __imp_GetDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

Error LNK2001 unresolved external symbol __imp_GetDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_ReleaseDC referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

Error LNK2001 unresolved external symbol __imp_ReleaseDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

Error LNK2001 unresolved external symbol __imp_ReleaseDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_LoadCursorW referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromSystem(enum sf::Cursor::Type)" (?loadFromSystem@CursorImpl@priv@sf@@QEAA_NW4Type@Cursor@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

Error LNK2001 unresolved external symbol __imp_LoadCursorW OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_DestroyCursor referenced in function "public: __cdecl sf::priv::CursorImpl::~CursorImpl(void)" (??1CursorImpl@priv@sf@@QEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_CreateIconIndirect referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_CopyIcon referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromSystem(enum sf::Cursor::Type)" (?loadFromSystem@CursorImpl@priv@sf@@QEAA_NW4Type@Cursor@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_CreateWindowExA referenced in function "private: void __cdecl sf::priv::WglContext::createSurface(class sf::priv::WglContext *,unsigned int,unsigned int,unsigned int)" (?createSurface@WglContext@priv@sf@@AEAAXPEAV123@III@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_DestroyWindow referenced in function "public: virtual __cdecl sf::priv::WglContext::~WglContext(void)" (??1WglContext@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

Error LNK2001 unresolved external symbol __imp_DestroyWindow OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_ShowWindow referenced in function "private: void __cdecl sf::priv::WglContext::createSurface(class sf::priv::WglContext *,unsigned int,unsigned int,unsigned int)" (?createSurface@WglContext@priv@sf@@AEAAXPEAV123@III@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

Error LNK2001 unresolved external symbol __imp_ShowWindow OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_TrackMouseEvent referenced in function "private: void __cdecl sf::priv::WindowImplWin32::cleanup(void)" (?cleanup@WindowImplWin32@priv@sf@@AEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_TranslateMessage referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_DispatchMessageW referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_PeekMessageW referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_SendMessageW referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UEAAXIIPEBE@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_RegisterDeviceNotificationW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_DefWindowProcW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_CallWindowProcW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_RegisterClassW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_UnregisterClassW referenced in function "public: virtual __cdecl sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_CreateWindowExW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_FlashWindowEx referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_SetWindowPos referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_GetKeyState referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_MapVirtualKeyW referenced in function "private: static enum sf::Keyboard::Key __cdecl sf::priv::WindowImplWin32::virtualKeyCodeToSF(unsigned __int64,__int64)" (?virtualKeyCodeToSF@WindowImplWin32@priv@sf@@CA?AW4Key@Keyboard@3@_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_GetCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_SetCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_ReleaseCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::cleanup(void)" (?cleanup@WindowImplWin32@priv@sf@@AEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_GetForegroundWindow referenced in function "public: virtual bool __cdecl sf::priv::WindowImplWin32::hasFocus(void)const " (?hasFocus@WindowImplWin32@priv@sf@@UEBA_NXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_SetForegroundWindow referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_SetWindowTextW referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UEAAXAEBVString@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_GetClientRect referenced in function "public: virtual class sf::Vector2<unsigned int> __cdecl sf::priv::WindowImplWin32::getSize(void)const " (?getSize@WindowImplWin32@priv@sf@@UEBA?AV?$Vector2@I@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_GetWindowRect referenced in function "public: virtual class sf::Vector2<int> __cdecl sf::priv::WindowImplWin32::getPosition(void)const " (?getPosition@WindowImplWin32@priv@sf@@UEBA?AV?$Vector2@H@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_AdjustWindowRect referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_ShowCursor referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_SetCursor referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_ScreenToClient referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_MapWindowPoints referenced in function "private: void __cdecl sf::priv::WindowImplWin32::grabCursor(bool)" (?grabCursor@WindowImplWin32@priv@sf@@AEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_ClipCursor referenced in function "private: void __cdecl sf::priv::WindowImplWin32::grabCursor(bool)" (?grabCursor@WindowImplWin32@priv@sf@@AEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_GetWindowLongW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_SetWindowLongW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_GetWindowLongPtrW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_SetWindowLongPtrW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(struct HWND__ *)" (??0WindowImplWin32@priv@sf@@QEAA@PEAUHWND__@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_GetWindowThreadProcessId referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_CreateIcon referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UEAAXIIPEBE@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_DestroyIcon referenced in function "public: virtual __cdecl sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_ChangeDisplaySettingsW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_RegCloseKey referenced in function "class sf::String __cdecl
anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

Error LNK2019 unresolved external symbol __imp_RegOpenKeyExW referenced in function "class sf::String __cdecl `anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

Error LNK1120 50 unresolved externals OSTetris C:UsersgreenDocumentsGitHubOSTetrisx64ReleaseOSTetris.exe 1











share|improve this question















migrated from superuser.com Jan 12 at 18:27


This question came from our site for computer enthusiasts and power users.























    1















    I'm trying to build a simple SFML program, but I keep getting these errors when I build the program. I tried Google, but the errors were always different than mine. I have SFML statically linked, here's my linker input:




    winmm.lib;sfml-system-s.lib;ws2_32.lib;sfml-network-s.lib;opengl32.lib;gdi32.lib;sfml-window-s.lib;freetype.lib;sfml-graphics-s.lib




    I have the SFML_STATIC line as well. I'm not quite sure what the problem is.



    Code:



    #ifndef __IOSTREAM_H
    #include <iostream>
    #endif

    #include "data/movement.h"
    #include <SFML/Graphics.hpp>


    int main()
    {
    sf::RenderWindow mainw(sf::VideoMode(512, 512), "Window");

    while (mainw.isOpen())
    {
    sf::Event winEvent;
    while (mainw.pollEvent(winEvent))
    {
    if (winEvent.type == sf::Event::Closed)
    {
    mainw.close();
    } else;
    if (winEvent.type == sf::Event::KeyPressed)
    {
    if (winEvent.key.code == sf::Keyboard::Up)
    {
    upEvent();
    }
    else if (winEvent.key.code == sf::Keyboard::Down)
    {
    downEvent();
    }
    else if (winEvent.key.code == sf::Keyboard::Left)
    {
    leftEvent();
    }
    else if (winEvent.key.code == sf::Keyboard::Right)
    {
    rightEvent();
    }
    }
    }
    }

    return 0;
    }


    Errors:




    Severity Code Description Project File Line Suppression State
    Error LNK2019 unresolved external symbol __imp_RegQueryValueExW referenced in function "class sf::String __cdecl anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_EnumDisplaySettingsW referenced in function "public: static class sf::VideoMode __cdecl sf::priv::VideoModeImpl::getDesktopMode(void)" (?getDesktopMode@VideoModeImpl@priv@sf@@SA?AVVideoMode@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(VideoModeImpl.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_GetDC referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

    Error LNK2001 unresolved external symbol __imp_GetDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

    Error LNK2001 unresolved external symbol __imp_GetDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_ReleaseDC referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

    Error LNK2001 unresolved external symbol __imp_ReleaseDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

    Error LNK2001 unresolved external symbol __imp_ReleaseDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_LoadCursorW referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromSystem(enum sf::Cursor::Type)" (?loadFromSystem@CursorImpl@priv@sf@@QEAA_NW4Type@Cursor@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

    Error LNK2001 unresolved external symbol __imp_LoadCursorW OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_DestroyCursor referenced in function "public: __cdecl sf::priv::CursorImpl::~CursorImpl(void)" (??1CursorImpl@priv@sf@@QEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_CreateIconIndirect referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_CopyIcon referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromSystem(enum sf::Cursor::Type)" (?loadFromSystem@CursorImpl@priv@sf@@QEAA_NW4Type@Cursor@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_CreateWindowExA referenced in function "private: void __cdecl sf::priv::WglContext::createSurface(class sf::priv::WglContext *,unsigned int,unsigned int,unsigned int)" (?createSurface@WglContext@priv@sf@@AEAAXPEAV123@III@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_DestroyWindow referenced in function "public: virtual __cdecl sf::priv::WglContext::~WglContext(void)" (??1WglContext@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

    Error LNK2001 unresolved external symbol __imp_DestroyWindow OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_ShowWindow referenced in function "private: void __cdecl sf::priv::WglContext::createSurface(class sf::priv::WglContext *,unsigned int,unsigned int,unsigned int)" (?createSurface@WglContext@priv@sf@@AEAAXPEAV123@III@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

    Error LNK2001 unresolved external symbol __imp_ShowWindow OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_TrackMouseEvent referenced in function "private: void __cdecl sf::priv::WindowImplWin32::cleanup(void)" (?cleanup@WindowImplWin32@priv@sf@@AEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_TranslateMessage referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_DispatchMessageW referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_PeekMessageW referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_SendMessageW referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UEAAXIIPEBE@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_RegisterDeviceNotificationW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_DefWindowProcW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_CallWindowProcW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_RegisterClassW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_UnregisterClassW referenced in function "public: virtual __cdecl sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_CreateWindowExW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_FlashWindowEx referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_SetWindowPos referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_GetKeyState referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_MapVirtualKeyW referenced in function "private: static enum sf::Keyboard::Key __cdecl sf::priv::WindowImplWin32::virtualKeyCodeToSF(unsigned __int64,__int64)" (?virtualKeyCodeToSF@WindowImplWin32@priv@sf@@CA?AW4Key@Keyboard@3@_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_GetCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_SetCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_ReleaseCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::cleanup(void)" (?cleanup@WindowImplWin32@priv@sf@@AEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_GetForegroundWindow referenced in function "public: virtual bool __cdecl sf::priv::WindowImplWin32::hasFocus(void)const " (?hasFocus@WindowImplWin32@priv@sf@@UEBA_NXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_SetForegroundWindow referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_SetWindowTextW referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UEAAXAEBVString@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_GetClientRect referenced in function "public: virtual class sf::Vector2<unsigned int> __cdecl sf::priv::WindowImplWin32::getSize(void)const " (?getSize@WindowImplWin32@priv@sf@@UEBA?AV?$Vector2@I@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_GetWindowRect referenced in function "public: virtual class sf::Vector2<int> __cdecl sf::priv::WindowImplWin32::getPosition(void)const " (?getPosition@WindowImplWin32@priv@sf@@UEBA?AV?$Vector2@H@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_AdjustWindowRect referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_ShowCursor referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_SetCursor referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_ScreenToClient referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_MapWindowPoints referenced in function "private: void __cdecl sf::priv::WindowImplWin32::grabCursor(bool)" (?grabCursor@WindowImplWin32@priv@sf@@AEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_ClipCursor referenced in function "private: void __cdecl sf::priv::WindowImplWin32::grabCursor(bool)" (?grabCursor@WindowImplWin32@priv@sf@@AEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_GetWindowLongW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_SetWindowLongW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_GetWindowLongPtrW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_SetWindowLongPtrW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(struct HWND__ *)" (??0WindowImplWin32@priv@sf@@QEAA@PEAUHWND__@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_GetWindowThreadProcessId referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_CreateIcon referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UEAAXIIPEBE@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_DestroyIcon referenced in function "public: virtual __cdecl sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_ChangeDisplaySettingsW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_RegCloseKey referenced in function "class sf::String __cdecl
    anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

    Error LNK2019 unresolved external symbol __imp_RegOpenKeyExW referenced in function "class sf::String __cdecl `anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

    Error LNK1120 50 unresolved externals OSTetris C:UsersgreenDocumentsGitHubOSTetrisx64ReleaseOSTetris.exe 1











    share|improve this question















    migrated from superuser.com Jan 12 at 18:27


    This question came from our site for computer enthusiasts and power users.





















      1












      1








      1








      I'm trying to build a simple SFML program, but I keep getting these errors when I build the program. I tried Google, but the errors were always different than mine. I have SFML statically linked, here's my linker input:




      winmm.lib;sfml-system-s.lib;ws2_32.lib;sfml-network-s.lib;opengl32.lib;gdi32.lib;sfml-window-s.lib;freetype.lib;sfml-graphics-s.lib




      I have the SFML_STATIC line as well. I'm not quite sure what the problem is.



      Code:



      #ifndef __IOSTREAM_H
      #include <iostream>
      #endif

      #include "data/movement.h"
      #include <SFML/Graphics.hpp>


      int main()
      {
      sf::RenderWindow mainw(sf::VideoMode(512, 512), "Window");

      while (mainw.isOpen())
      {
      sf::Event winEvent;
      while (mainw.pollEvent(winEvent))
      {
      if (winEvent.type == sf::Event::Closed)
      {
      mainw.close();
      } else;
      if (winEvent.type == sf::Event::KeyPressed)
      {
      if (winEvent.key.code == sf::Keyboard::Up)
      {
      upEvent();
      }
      else if (winEvent.key.code == sf::Keyboard::Down)
      {
      downEvent();
      }
      else if (winEvent.key.code == sf::Keyboard::Left)
      {
      leftEvent();
      }
      else if (winEvent.key.code == sf::Keyboard::Right)
      {
      rightEvent();
      }
      }
      }
      }

      return 0;
      }


      Errors:




      Severity Code Description Project File Line Suppression State
      Error LNK2019 unresolved external symbol __imp_RegQueryValueExW referenced in function "class sf::String __cdecl anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_EnumDisplaySettingsW referenced in function "public: static class sf::VideoMode __cdecl sf::priv::VideoModeImpl::getDesktopMode(void)" (?getDesktopMode@VideoModeImpl@priv@sf@@SA?AVVideoMode@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(VideoModeImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetDC referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_GetDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_GetDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ReleaseDC referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_ReleaseDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_ReleaseDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_LoadCursorW referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromSystem(enum sf::Cursor::Type)" (?loadFromSystem@CursorImpl@priv@sf@@QEAA_NW4Type@Cursor@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_LoadCursorW OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_DestroyCursor referenced in function "public: __cdecl sf::priv::CursorImpl::~CursorImpl(void)" (??1CursorImpl@priv@sf@@QEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CreateIconIndirect referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CopyIcon referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromSystem(enum sf::Cursor::Type)" (?loadFromSystem@CursorImpl@priv@sf@@QEAA_NW4Type@Cursor@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CreateWindowExA referenced in function "private: void __cdecl sf::priv::WglContext::createSurface(class sf::priv::WglContext *,unsigned int,unsigned int,unsigned int)" (?createSurface@WglContext@priv@sf@@AEAAXPEAV123@III@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_DestroyWindow referenced in function "public: virtual __cdecl sf::priv::WglContext::~WglContext(void)" (??1WglContext@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_DestroyWindow OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ShowWindow referenced in function "private: void __cdecl sf::priv::WglContext::createSurface(class sf::priv::WglContext *,unsigned int,unsigned int,unsigned int)" (?createSurface@WglContext@priv@sf@@AEAAXPEAV123@III@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_ShowWindow OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_TrackMouseEvent referenced in function "private: void __cdecl sf::priv::WindowImplWin32::cleanup(void)" (?cleanup@WindowImplWin32@priv@sf@@AEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_TranslateMessage referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_DispatchMessageW referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_PeekMessageW referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SendMessageW referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UEAAXIIPEBE@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_RegisterDeviceNotificationW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_DefWindowProcW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CallWindowProcW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_RegisterClassW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_UnregisterClassW referenced in function "public: virtual __cdecl sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CreateWindowExW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_FlashWindowEx referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetWindowPos referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetKeyState referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_MapVirtualKeyW referenced in function "private: static enum sf::Keyboard::Key __cdecl sf::priv::WindowImplWin32::virtualKeyCodeToSF(unsigned __int64,__int64)" (?virtualKeyCodeToSF@WindowImplWin32@priv@sf@@CA?AW4Key@Keyboard@3@_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ReleaseCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::cleanup(void)" (?cleanup@WindowImplWin32@priv@sf@@AEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetForegroundWindow referenced in function "public: virtual bool __cdecl sf::priv::WindowImplWin32::hasFocus(void)const " (?hasFocus@WindowImplWin32@priv@sf@@UEBA_NXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetForegroundWindow referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetWindowTextW referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UEAAXAEBVString@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetClientRect referenced in function "public: virtual class sf::Vector2<unsigned int> __cdecl sf::priv::WindowImplWin32::getSize(void)const " (?getSize@WindowImplWin32@priv@sf@@UEBA?AV?$Vector2@I@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetWindowRect referenced in function "public: virtual class sf::Vector2<int> __cdecl sf::priv::WindowImplWin32::getPosition(void)const " (?getPosition@WindowImplWin32@priv@sf@@UEBA?AV?$Vector2@H@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_AdjustWindowRect referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ShowCursor referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetCursor referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ScreenToClient referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_MapWindowPoints referenced in function "private: void __cdecl sf::priv::WindowImplWin32::grabCursor(bool)" (?grabCursor@WindowImplWin32@priv@sf@@AEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ClipCursor referenced in function "private: void __cdecl sf::priv::WindowImplWin32::grabCursor(bool)" (?grabCursor@WindowImplWin32@priv@sf@@AEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetWindowLongW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetWindowLongW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetWindowLongPtrW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetWindowLongPtrW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(struct HWND__ *)" (??0WindowImplWin32@priv@sf@@QEAA@PEAUHWND__@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetWindowThreadProcessId referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CreateIcon referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UEAAXIIPEBE@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_DestroyIcon referenced in function "public: virtual __cdecl sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ChangeDisplaySettingsW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_RegCloseKey referenced in function "class sf::String __cdecl
      anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_RegOpenKeyExW referenced in function "class sf::String __cdecl `anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

      Error LNK1120 50 unresolved externals OSTetris C:UsersgreenDocumentsGitHubOSTetrisx64ReleaseOSTetris.exe 1











      share|improve this question
















      I'm trying to build a simple SFML program, but I keep getting these errors when I build the program. I tried Google, but the errors were always different than mine. I have SFML statically linked, here's my linker input:




      winmm.lib;sfml-system-s.lib;ws2_32.lib;sfml-network-s.lib;opengl32.lib;gdi32.lib;sfml-window-s.lib;freetype.lib;sfml-graphics-s.lib




      I have the SFML_STATIC line as well. I'm not quite sure what the problem is.



      Code:



      #ifndef __IOSTREAM_H
      #include <iostream>
      #endif

      #include "data/movement.h"
      #include <SFML/Graphics.hpp>


      int main()
      {
      sf::RenderWindow mainw(sf::VideoMode(512, 512), "Window");

      while (mainw.isOpen())
      {
      sf::Event winEvent;
      while (mainw.pollEvent(winEvent))
      {
      if (winEvent.type == sf::Event::Closed)
      {
      mainw.close();
      } else;
      if (winEvent.type == sf::Event::KeyPressed)
      {
      if (winEvent.key.code == sf::Keyboard::Up)
      {
      upEvent();
      }
      else if (winEvent.key.code == sf::Keyboard::Down)
      {
      downEvent();
      }
      else if (winEvent.key.code == sf::Keyboard::Left)
      {
      leftEvent();
      }
      else if (winEvent.key.code == sf::Keyboard::Right)
      {
      rightEvent();
      }
      }
      }
      }

      return 0;
      }


      Errors:




      Severity Code Description Project File Line Suppression State
      Error LNK2019 unresolved external symbol __imp_RegQueryValueExW referenced in function "class sf::String __cdecl anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_EnumDisplaySettingsW referenced in function "public: static class sf::VideoMode __cdecl sf::priv::VideoModeImpl::getDesktopMode(void)" (?getDesktopMode@VideoModeImpl@priv@sf@@SA?AVVideoMode@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(VideoModeImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetDC referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_GetDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_GetDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ReleaseDC referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_ReleaseDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_ReleaseDC OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_LoadCursorW referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromSystem(enum sf::Cursor::Type)" (?loadFromSystem@CursorImpl@priv@sf@@QEAA_NW4Type@Cursor@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_LoadCursorW OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_DestroyCursor referenced in function "public: __cdecl sf::priv::CursorImpl::~CursorImpl(void)" (??1CursorImpl@priv@sf@@QEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CreateIconIndirect referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CopyIcon referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromSystem(enum sf::Cursor::Type)" (?loadFromSystem@CursorImpl@priv@sf@@QEAA_NW4Type@Cursor@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(CursorImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CreateWindowExA referenced in function "private: void __cdecl sf::priv::WglContext::createSurface(class sf::priv::WglContext *,unsigned int,unsigned int,unsigned int)" (?createSurface@WglContext@priv@sf@@AEAAXPEAV123@III@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_DestroyWindow referenced in function "public: virtual __cdecl sf::priv::WglContext::~WglContext(void)" (??1WglContext@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_DestroyWindow OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ShowWindow referenced in function "private: void __cdecl sf::priv::WglContext::createSurface(class sf::priv::WglContext *,unsigned int,unsigned int,unsigned int)" (?createSurface@WglContext@priv@sf@@AEAAXPEAV123@III@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WglContext.cpp.obj) 1

      Error LNK2001 unresolved external symbol __imp_ShowWindow OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_TrackMouseEvent referenced in function "private: void __cdecl sf::priv::WindowImplWin32::cleanup(void)" (?cleanup@WindowImplWin32@priv@sf@@AEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_TranslateMessage referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_DispatchMessageW referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_PeekMessageW referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SendMessageW referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UEAAXIIPEBE@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_RegisterDeviceNotificationW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_DefWindowProcW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CallWindowProcW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_RegisterClassW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_UnregisterClassW referenced in function "public: virtual __cdecl sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CreateWindowExW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_FlashWindowEx referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetWindowPos referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetKeyState referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_MapVirtualKeyW referenced in function "private: static enum sf::Keyboard::Key __cdecl sf::priv::WindowImplWin32::virtualKeyCodeToSF(unsigned __int64,__int64)" (?virtualKeyCodeToSF@WindowImplWin32@priv@sf@@CA?AW4Key@Keyboard@3@_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ReleaseCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::cleanup(void)" (?cleanup@WindowImplWin32@priv@sf@@AEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetForegroundWindow referenced in function "public: virtual bool __cdecl sf::priv::WindowImplWin32::hasFocus(void)const " (?hasFocus@WindowImplWin32@priv@sf@@UEBA_NXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetForegroundWindow referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetWindowTextW referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UEAAXAEBVString@3@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetClientRect referenced in function "public: virtual class sf::Vector2<unsigned int> __cdecl sf::priv::WindowImplWin32::getSize(void)const " (?getSize@WindowImplWin32@priv@sf@@UEBA?AV?$Vector2@I@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetWindowRect referenced in function "public: virtual class sf::Vector2<int> __cdecl sf::priv::WindowImplWin32::getPosition(void)const " (?getPosition@WindowImplWin32@priv@sf@@UEBA?AV?$Vector2@H@3@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_AdjustWindowRect referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ShowCursor referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetCursor referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ScreenToClient referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_MapWindowPoints referenced in function "private: void __cdecl sf::priv::WindowImplWin32::grabCursor(bool)" (?grabCursor@WindowImplWin32@priv@sf@@AEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ClipCursor referenced in function "private: void __cdecl sf::priv::WindowImplWin32::grabCursor(bool)" (?grabCursor@WindowImplWin32@priv@sf@@AEAAX_N@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetWindowLongW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetWindowLongW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetWindowLongPtrW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_SetWindowLongPtrW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(struct HWND__ *)" (??0WindowImplWin32@priv@sf@@QEAA@PEAUHWND__@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_GetWindowThreadProcessId referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_CreateIcon referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UEAAXIIPEBE@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_DestroyIcon referenced in function "public: virtual __cdecl sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UEAA@XZ) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_ChangeDisplaySettingsW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(WindowImplWin32.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_RegCloseKey referenced in function "class sf::String __cdecl
      anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

      Error LNK2019 unresolved external symbol __imp_RegOpenKeyExW referenced in function "class sf::String __cdecl `anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:UsersgreenDocumentsGitHubOSTetrissfml-window-s.lib(JoystickImpl.cpp.obj) 1

      Error LNK1120 50 unresolved externals OSTetris C:UsersgreenDocumentsGitHubOSTetrisx64ReleaseOSTetris.exe 1








      visual-studio visual-c++ sfml






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 12 at 22:32









      bruglesco

      2091313




      2091313










      asked Jan 12 at 6:06









      AnorakiAnoraki

      62




      62




      migrated from superuser.com Jan 12 at 18:27


      This question came from our site for computer enthusiasts and power users.









      migrated from superuser.com Jan 12 at 18:27


      This question came from our site for computer enthusiasts and power users.


























          1 Answer
          1






          active

          oldest

          votes


















          1














          First I am going to link to SFML's tutorial page for Visual Studio linking.



          But it looks like you only link the release versions. Make sure you use the Debug libs under the Debug configuration and the Release libs under the Release configuration. Each configuration needs setup individually.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54162621%2fsfml-2-5-1-in-vs2017-many-unresolved-external-symbol-errors%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            First I am going to link to SFML's tutorial page for Visual Studio linking.



            But it looks like you only link the release versions. Make sure you use the Debug libs under the Debug configuration and the Release libs under the Release configuration. Each configuration needs setup individually.






            share|improve this answer




























              1














              First I am going to link to SFML's tutorial page for Visual Studio linking.



              But it looks like you only link the release versions. Make sure you use the Debug libs under the Debug configuration and the Release libs under the Release configuration. Each configuration needs setup individually.






              share|improve this answer


























                1












                1








                1







                First I am going to link to SFML's tutorial page for Visual Studio linking.



                But it looks like you only link the release versions. Make sure you use the Debug libs under the Debug configuration and the Release libs under the Release configuration. Each configuration needs setup individually.






                share|improve this answer













                First I am going to link to SFML's tutorial page for Visual Studio linking.



                But it looks like you only link the release versions. Make sure you use the Debug libs under the Debug configuration and the Release libs under the Release configuration. Each configuration needs setup individually.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 12 at 20:08









                bruglescobruglesco

                2091313




                2091313
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54162621%2fsfml-2-5-1-in-vs2017-many-unresolved-external-symbol-errors%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Plaza Victoria

                    Puebla de Zaragoza

                    Musa