As @aj.toulan said, you need to Link SFML statically. I will assume you're developing on Windows using Visual Studio.
When you download and setup SFML, it already has static libraries built.
If you are using any external libs you need to build a static version of them!
You need to add a pre-processor definition for SFML_STATIC in your Project Properties.
- Go to Project Properties
- Go to tab C/C++
- Preprocessor
- Add "SFML_STATIC;" at the start of Preprocessor Definitions and press Enter.
- Apply
Now you need to include static libraries. Whichever SFML libraries you are using in your project but you add "-s"
Eg #pragma comment(lib,"sfml-graphics-s.lib")
SFML uses openal32.lib and due to licensing, you will need to have that DLL in the folder with your exe
#ifndef SFML_STATIC
#pragma comment(lib,"sfml-graphics-s.lib")
#pragma comment(lib,"freetype.lib")
#pragma comment(lib,"opengl32.lib")
#pragma comment(lib,"sfml-system-s.lib")
#pragma comment(lib,"winmm.lib")
#pragma comment(lib,"sfml-window-s.lib")
#pragma comment(lib,"gdi32")
#pragma comment(lib,"winmm")
#pragma comment(lib,"sfml-audio-s.lib")
#pragma comment(lib,"flac.lib")
#pragma comment(lib,"ogg.lib")
#pragma comment(lib,"vorbisenc.lib")
#pragma comment(lib,"vorbisfile.lib")
#pragma comment(lib,"vorbis.lib")
#pragma comment(lib,"openal32.lib")
#pragma comment(lib,"sfml-main.lib")
#pragma comment(lib,"sfml-network-s.lib")
#pragma comment(lib,"ws2_32.lib")
#pragma comment(lib,"openal32.lib")
//include below line if you want to hide console window
#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
#endif // !SFML_STATIC
Link to SFML FAQ showing what you need to include for each lib when linking statically