Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jacky88

Pages: [1]
1
General / Problem Full static link SFML 2.5.1 on visual studio 2017
« on: February 07, 2020, 01:32:10 pm »
-------
Background to problem (skip if uninterested)
-------
I create new empty project with SFML 2.5.1 follow this guide: https://www.sfml-dev.org/tutorials/2.5/start-vc.php. I try to use full static linker.
-------

Operating system: Windows 10
Visual studio version: Visual studio 2017
SFML Version: 2.5.1-vc15-32-bit

In all configurations I have:
C/C++ >> General >> Additional Include Directories >> linked to the include folder
Linker >> General >> Additional Library Directories >> linked to the lib folder
C/C++ >> Preprocessor >> SFML_STATIC

in my release I have:
Linker >> input >> additional dependencies
opengl32.lib
winmm.lib
gdi32.lib
freetype.lib
sfml-system-s.lib
sfml-window-s.lib
sfml-graphics-s.lib


in Debug:
Linker >> input >> additional dependencies
freetype.lib
gdi32.lib
winmm.lib
opengl32.lib
sfml-system-s-d.lib
sfml-window-s-d.lib
sfml-graphics-s-d.lib

=============
But I can not build project successfully. It raised LNK2019 and LNK2001 error like that:
Error   LNK2019   unresolved external symbol __imp__GetDC@4 referenced in function "public: bool __thiscall sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QAE_NPBEV?$Vector2@I@3@1@Z)   SFMLExample   C:\CppTraining\TrainingCpp\SFMLExample\sfml-window-s-d.lib(CursorImpl.cpp.obj)   1   
Error   LNK2001   unresolved external symbol __imp__GetDC@4   SFMLExample   C:\CppTraining\TrainingCpp\SFMLExample\sfml-window-s-d.lib(WglContext.cpp.obj)   1   

I try to search but don't find the problem. Please help me !!
Thanks


Pages: [1]