So far, I am able to dynamically link SFML and run the executable just fine. However, statically linking the SFML errors saying:
sfml-graphics-s.lib(RenderWindow.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in Main.o
My clang version and information are:
clang version 15.0.7
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: ...
which made me not accomplish any solutions from quick google search about my problem as their build system or environment is different from mine.
I downloaded the SFML version for Visual Studio 64 bit, and then setted up the required search directories and linkers such as sfml-graphics-s.lib.
My command line is:
clang++.exe -DSFML_STATIC -fms-extensions -O2 -Wnon-virtual-dtor -Wall -std=c++14 -I"Deps\SFML\include" -c "Main.cpp" -o "Main.o"
clang++.exe -L"Deps\SFML\lib" -o "Main.exe" "Main.o" -m64 -lfreetype.lib -lopengl32.lib -lwinmm.lib -lgdi32.lib -luser32.lib -lsfml-window.lib -lsfml-graphics-s.lib -lsfml-system.lib