Use this file to discover all available pages before exploring further.
DOSBox-X can be compiled from source on all major platforms. The build system supports both SDL 1.2 (included in-tree with heavy modifications) and SDL 2.x. In addition to pre-built releases and nightly development builds, building from source gives you full control over feature flags, SDL version, and target platform.
The SDL 1.x library shipped in-tree has been heavily modified from the upstream SDL 1.2 sources — it is not compatible with a stock SDL 1.2 installation. Always use the in-tree version for SDL1 builds.
The build requires a C++ compiler capable of at least the C++11 standard (GCC, Clang, or MSVC 2017+). New contributions should target C++14 compatibility per the project coding guidelines.
The slirp networking backend is only available in MinGW builds. Visual Studio builds do not support libslirp. Use the pcap backend or MinGW if you need slirp-based NE2000 networking.
MinGW builds support the slirp networking backend and are used for the official release and nightly binaries. Use MSYS2 for the easiest setup.
1
Install MSYS2 and dependencies
Open the correct MSYS2 shell for your target architecture and install the required packages.
Windows XP / Vista (lowend build):Use the 32-bit lowend MinGW toolchain for XP compatibility. Download the toolchain from the link in the repository and overwrite the MSYS2 MinGW32 environment with it.
Lowend and 9x builds must not be compiled with MinGW-w64. Use the original MinGW (32-bit) toolchain only — MinGW-w64 introduces runtime dependencies that Windows XP, Vista, and 9x/NT4 do not support.
Ubuntu 20.04 and later (and compatible Debian-based distros) are well-tested. An equivalent build-debug-sdl2 script is available for SDL2.
# SDL1 build./build-debugsudo make install# SDL2 build (alternative)./build-debug-sdl2sudo make install
For Raspberry Pi, add libtool autogen to the apt command above. The ./build-debug and ./build-debug-sdl2 scripts work the same way. If you experience audio issues, prefer the SDL2 build.
Fedora Workstation and RHEL/CentOS (with EPEL) are supported. Video recording via FFmpeg requires the optional rpmfusion-free repository.
1
Install development tools and libraries
sudo dnf group install "C Development Tools and Libraries"sudo dnf install SDL_net-devel SDL2_net-devel libxkbfile-devel \ ncurses-devel libpcap-devel libslirp-devel libpng-devel \ fluidsynth-devel freetype-devel nasm
For video recording support, also install ffmpeg-devel from rpmfusion-free.
./build-debugsudo make install# Or SDL2:./build-debug-sdl2sudo make install
Building an RPM package:
sudo dnf group install "RPM Development Tools"./make-rpm.sh
The resulting RPM is placed in the releases/ directory.
macOS High Sierra (10.13) and later are supported, including Intel, Apple Silicon, and Universal Binary builds. The compiler is LLVM/Clang from Xcode; the build system uses GNU autotools installed via Homebrew or MacPorts.
Universal Binary builds require a host machine with an Apple Silicon CPU and parallel Homebrew installations running natively and under Rosetta 2. They cannot be built on Intel Macs.
Targeting macOS Sierra (10.12) and older (experimental):
DOSBox-X can be compiled to run natively in a real MS-DOS 5.0+ environment using the HX DOS Extender. This requires the original 32-bit MinGW toolchain (not MinGW-w64).
1
Set up the MinGW toolchain
Download the HX-DOS build environment from the link in the repository (build-scripts/mingw/lowend-bin/) and install it into your MSYS2 MinGW32 environment.See hxdos.yml for the exact steps used in the official CI builds.
2
Build (SDL1, 32-bit only)
./build-mingw-hx-dos
HX-DOS builds must not use MinGW-w64. The HX DOS Extender does not support the additional runtime dependencies introduced by MinGW-w64.