Hi. I'm trying to static link prebuilt binaries using Visual Studio 2019 and it fails with undefined references type of LNK2019. It works with dynamic link (no "s" suffix) and the app runs okay with dlls provided.
The command I'm trying to build with is:
cl -EHsc main.cpp sfml-graphics-s.lib sfml-window-s.lib sfml-system-s.lib opengl32.lib freetype.lib winmm.lib gdi32.lib
This command is for building your example green circle.
Am I wrong in linkage order? It fails on linking the graphics package. Same command previously worked with MinGW's g++, of course with proper substitutions.
.....
main.obj : error LNK2019: ссылка на неразрешенный внешний символ "__declspec(dllimport) public: __cdecl sf::String::String(char const *,class std::locale const &)" (__imp_??0String@sf@@QEAA@PEBDAEBVlocale@std@@@Z) в функции main
main.obj : error LNK2019: ссылка на неразрешенный внешний символ "__declspec(dllimport) public: __cdecl sf::String::~String(void)" (__imp_??1String@sf@@QEAA@XZ) в функции main
main.obj : error LNK2019: ссылка на неразрешенный внешний символ "__declspec(dllimport) public: __cdecl sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QEAA@III@Z) в функции main
main.obj : error LNK2019: ссылка на неразрешенный внешний символ "__declspec(dllimport) public: void __cdecl sf::Window::close(void)" (__imp_?close@Window@sf@@QEAAXXZ) в функции main
.......
UPD: -DSFML_STATIC makes no effect (even longer list of link fails)