FreeRDP supports two distinct build paths on Windows: a native build using the Microsoft Visual C++ toolchain (MSVC) invoked from a Visual Studio Developer Command Prompt, and a cross-compile path using llvm-mingw from a Linux host. The native MSVC build is the most straightforward path for Windows developers. The MinGW cross-compile path is useful for CI pipelines and for producing standalone Windows binaries from a Linux environment; a self-contained Docker-based example lives inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/FreeRDP/FreeRDP/llms.txt
Use this file to discover all available pages before exploring further.
docs/mingw-example/ inside the repository.
Native Build with Visual Studio (MSVC)
The native build follows the same CMake configure-build-install pattern used on all platforms. The only difference is that the configure step must be run from a Visual Studio Developer Command Prompt (or acmd.exe session that has already executed vcvarsall.bat) so that CMake can locate cl.exe, the linker, and the Windows SDK headers.
Open a Visual Studio Developer Command Prompt
Launch Developer Command Prompt for VS 2022 (or the equivalent for your Visual Studio version) from the Start menu. Alternatively, run
vcvarsall.bat from a regular cmd.exe:Configure with CMake
Adjust paths to match your source checkout and desired install location:
On Windows, the
WITH_X11 and WITH_WAYLAND flags are not applicable and are ignored. Windows-specific options include -DWITH_MEDIA_FOUNDATION=ON (H264 via Media Foundation, not available on UWP) and -DWITH_WINMM=ON (Windows Multimedia audio, enabled by default).Windows-Specific CMake Flags
| Feature | Flag | Default |
|---|---|---|
| Media Foundation H264 | -DWITH_MEDIA_FOUNDATION=ON/OFF | OFF |
| Windows Multimedia audio | -DWITH_WINMM=ON/OFF | ON |
| Windows 8 libraries | -DWITH_WIN8=ON/OFF | OFF |
| Console window | -DWITH_WIN_CONSOLE=ON/OFF | ON |
| Smartcard emulation | -DWITH_SMARTCARD_EMULATE=ON/OFF | ON |
| SDL client | -DWITH_CLIENT_SDL=ON/OFF | ON |
Cross-Compile with llvm-mingw (Docker)
The repository ships a complete, self-contained MinGW cross-compile example underdocs/mingw-example/. It uses a multi-stage Docker build to compile llvm-mingw dependencies (zlib, OpenSSL, OpenH264, libusb, FAAC, FAAD2, OpenCL) and then FreeRDP itself, all targeting Windows from a Linux host.
Repository structure
Building with Docker
Each architecture has a wrapper script. All three delegate to_build.sh, which calls docker build followed by docker compose up to extract binaries.
docs/mingw-example/build/ by the dist-builder Docker Compose service.
How the Docker build works
TheDockerfile downloads llvm-mingw (MSVCRT variant), installs it system-wide, and then builds each dependency in a separate stage:
CMake toolchain file (x86_64 example)
The toolchain files indocs/mingw-example/toolchain/cmake/ point CMake at the correct cross-compiler and sysroot:
Automated CI reference
The MinGW build is exercised in the official CI via the workflow at.github/workflows/mingw.yml and the build script scripts/mingw.sh. Check that script for the exact dependency versions used in the CI pipeline:
