Hi everyone,
I'm a total beginner, trying to get started with C++ and SFML. I followed the tutorial, got 46 errors, followed it again and got the same effect.
Windows 10 64-bit
Intel HD graphics card
Visual Studio 14 (2015), using Win32 platform.
SFML for VS 14 32-bit
Started with empty C++ project.
Additional Include Directories:
C:\Users\kubal\Documents\SFML-2.3.2\include;%(AdditionalIncludeDirectories)
Additional Library Directories:
C:\Users\kubal\Documents\SFML-2.3.2\lib;%(AdditionalLibraryDirectories)
I have not copied SFML dlls (or anything else) to my project directory. As far as I understand, that is only necessary for dynamic linking.
Additional Dependiencies (release):
sfml-system-s.lib;sfml-window-s.lib;sfml-graphics-s.lib;sfml-network-s.lib;sfml-audio-s.lib;winmm.lib;opengl32.lib;gdi32.lib;freetype.lib;jpeg.lib;ws2_32.lib;openal32.lib;flac.lib;vorbis.lib;vorbisfile.lib;vorbisenc.lib;ogg.lib
Additional Dependiencies (debug):
sfml-system-s-d.lib;sfml-window-s-d.lib;sfml-graphics-s-d.lib;sfml-network-s-d.lib;sfml-audio-s-d.lib;winmm.lib;opengl32.lib;gdi32.lib;freetype.lib;jpeg.lib;ws2_32.lib;openal32.lib;flac.lib;vorbis.lib;vorbisfile.lib;vorbisenc.lib;ogg.lib
Preprocessor:
SFML_STATIC;%(PreprocessorDefinitions)
main.cpp:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
Output log:
1>------ Build started: Project: TaleEngine-core, Configuration: Debug Win32 ------
1> main.cpp
1>sfml-window-s-d.lib(VideoModeImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__EnumDisplaySettingsW@12 referenced in function "public: static class std::vector<class sf::VideoMode,class std::allocator<class sf::VideoMode> > __cdecl sf::priv::VideoModeImpl::getFullscreenModes(void)" (?getFullscreenModes@VideoModeImpl@priv@sf@@SA?AV?$vector@VVideoMode@sf@@V?$allocator@VVideoMode@sf@@@std@@@std@@XZ)
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function "public: __thiscall sf::priv::WglContext::WglContext(class sf::priv::WglContext *)" (??0WglContext@priv@sf@@QAE@PAV012@@Z)
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function "public: virtual __thiscall sf::priv::WglContext::~WglContext(void)" (??1WglContext@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow@4
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function "public: __thiscall sf::priv::WglContext::WglContext(class sf::priv::WglContext *)" (??0WglContext@priv@sf@@QAE@PAV012@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetDC@4 referenced in function "public: __thiscall sf::priv::WglContext::WglContext(class sf::priv::WglContext *)" (??0WglContext@priv@sf@@QAE@PAV012@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__ReleaseDC@8 referenced in function "public: virtual __thiscall sf::priv::WglContext::~WglContext(void)" (??1WglContext@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__TrackMouseEvent@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::setTracking(bool)" (?setTracking@WindowImplWin32@priv@sf@@AAEX_N@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function "protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__DispatchMessageW@4 referenced in function "protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__PeekMessageW@20 referenced in function "protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SendMessageW@16 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UAEXIIPBE@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__DefWindowProcW@16 referenced in function "private: static long __stdcall sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned int,long)" (?globalOnEvent@WindowImplWin32@priv@sf@@CGJPAUHWND__@@IIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__CallWindowProcW@20 referenced in function "private: static long __stdcall sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned int,long)" (?globalOnEvent@WindowImplWin32@priv@sf@@CGJPAUHWND__@@IIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__RegisterClassW@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::registerWindowClass(void)" (?registerWindowClass@WindowImplWin32@priv@sf@@AAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__UnregisterClassW@8 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__CreateWindowExW@48 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QAE@VVideoMode@2@ABVString@2@IABUContextSettings@2@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__FlashWindowEx@4 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetWindowPos@28 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setPosition(class sf::Vector2<int> const &)" (?setPosition@WindowImplWin32@priv@sf@@UAEXABV?$Vector2@H@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetAsyncKeyState@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned int,long)" (?processEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__MapVirtualKeyW@8 referenced in function "private: static enum sf::Keyboard::Key __cdecl sf::priv::WindowImplWin32::virtualKeyCodeToSF(unsigned int,long)" (?virtualKeyCodeToSF@WindowImplWin32@priv@sf@@CA?AW4Key@Keyboard@3@IJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetCapture@0 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned int,long)" (?processEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetCapture@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned int,long)" (?processEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__ReleaseCapture@0 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::cleanup(void)" (?cleanup@WindowImplWin32@priv@sf@@AAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetForegroundWindow@0 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetForegroundWindow@4 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTextW@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UAEXABVString@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetClientRect@8 referenced in function "public: virtual class sf::Vector2<unsigned int> __thiscall sf::priv::WindowImplWin32::getSize(void)const " (?getSize@WindowImplWin32@priv@sf@@UBE?AV?$Vector2@I@3@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetWindowRect@8 referenced in function "public: virtual class sf::Vector2<int> __thiscall sf::priv::WindowImplWin32::getPosition(void)const " (?getPosition@WindowImplWin32@priv@sf@@UBE?AV?$Vector2@H@3@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__AdjustWindowRect@12 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QAE@VVideoMode@2@ABVString@2@IABUContextSettings@2@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetCursor@4 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UAEX_N@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__ScreenToClient@8 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned int,long)" (?processEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetWindowLongW@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setSize(class sf::Vector2<unsigned int> const &)" (?setSize@WindowImplWin32@priv@sf@@UAEXABV?$Vector2@I@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetWindowLongW@12 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(struct HWND__ *)" (??0WindowImplWin32@priv@sf@@QAE@PAUHWND__@@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetWindowThreadProcessId@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__LoadCursorW@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UAEX_N@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__CreateIcon@28 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UAEXIIPBE@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__DestroyIcon@4 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__ChangeDisplaySettingsW@8 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::switchToFullscreen(class sf::VideoMode const &)" (?switchToFullscreen@WindowImplWin32@priv@sf@@AAEXABVVideoMode@3@@Z)
1>sfml-window-s-d.lib(JoystickImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__RegCloseKey@4 referenced in function "class sf::String __cdecl `anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x2523b675@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z)
1>sfml-window-s-d.lib(JoystickImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__RegOpenKeyExW@20 referenced in function "class sf::String __cdecl `anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x2523b675@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z)
1>sfml-window-s-d.lib(JoystickImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__RegQueryValueExW@24 referenced in function "class sf::String __cdecl `anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x2523b675@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z)
1>c:\users\kubal\documents\visual studio 2015\Projects\TaleEngine\Debug\TaleEngine-core.exe : fatal error LNK1120: 41 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
It seems as if sfml-window-s-d.lib is missing some dependiencies, but I have no idea why.