Skip to content

Build Environment Setup

Sorecchione07435 edited this page Nov 10, 2026 · 4 revisions

Build Environment Setup

This guide explains how to install and configure the tools required to build VirtualBox VNC for Windows from source.

Before proceeding, make sure you have administrator privileges and a working internet connection.

1. Microsoft Visual Studio 2022

  1. Download the Visual Studio 2022 installer from the official Visual Studio website.
  2. Run the installer.
  3. Select the Desktop development with C++ workload.
  4. Make sure the following components are selected:
    • MSVC v143 C++ x64/x86 Build Tools.
    • Windows SDK.
    • C++ CMake tools for Windows, if required by the build scripts.
  5. Complete the installation.

The MSVC compiler and linker must be available to the build environment.

2. Windows SDK and WDK

The Windows SDK and Windows Driver Kit are required to compile the Windows-specific components and kernel drivers.

  1. Download the Windows SDK and WDK.
  2. Install the Windows SDK.
  3. Install the corresponding WDK version.
  4. If prompted, install the WDK Visual Studio extension through the Visual Studio Installer.

Important: Use compatible SDK and WDK versions. Their build numbers must match when compiling drivers.

3. Git

  1. Download Git for Windows.
  2. Run the installer.
  3. Follow the installation wizard.
  4. Make sure Git is available from the command line.

Verify the installation:

git --version

4. Python

  1. Download Python from python.org.
  2. Run the installer.
  3. Enable Add Python to PATH.
  4. Complete the installation.

Verify:

python --version

5. Java Development Kit (JDK)

The Java Development Kit (JDK) is required to build VirtualBox components and tools that depend on Java.

  1. Download a compatible JDK from one of the following sources:
  2. Install the JDK for Windows x64.
  3. Configure the JAVA_HOME environment variable to point to the JDK installation directory.
  4. Add the JDK bin directory to the Windows PATH environment variable.

For example:

JAVA_HOME=C:\Program Files\Eclipse Adoptium\jdk-<version>

Add the following to PATH:

%JAVA_HOME%\bin

Verify the installation:

java -version
javac -version

6. Qt 6

  1. Download the Qt Online Installer.
  2. Run the installer and sign in if required.
  3. Select at least Qt version 6.12.0 with the following components:
  • MSVC 2022 64-bit
  • Qt State Machines (Inside Additional Libraries)

Warning

Do not select the MinGW package if the project is configured to use MSVC.

The Qt version and modules must match the requirements specified by the project.

7. Yasm and NASM

Both assemblers are used by parts of the VirtualBox build system.

  1. Download the Windows binaries for Yasm and NASM.
  2. Extract or install them into suitable directories.
  3. Add their executable directories to the Windows PATH environment variable, or configure their locations in the build configuration.

Verify:

yasm --version
nasm --version

8. Open Watcom

  1. Visit the Open Watcom download page.
  2. Download a suitable Windows distribution.
  3. Run the installer, if using an installer package.
  4. Configure the required environment variables and executable paths according to the Open Watcom documentation.

Make sure the version is compatible with the VirtualBox source tree being built.

9. WiX Toolset

WiX is used to generate Windows MSI installation packages.

  1. Download the WiX version required by the project.
  2. Install the package using its official installation instructions.
  3. Make sure the required WiX executables are accessible to the build scripts.

Important: WiX versions are not necessarily interchangeable. Use the version specified by the project's build configuration.

10. Flex and Bison

On Windows, WinFlexBison can provide compatible Windows executables for both tools.

  1. Open the WinFlexBison releases page.
  2. Download a suitable release.
  3. Extract the archive.
  4. Rename win_flex.exe to flex.exe and win_bison.exe to bison.exe.

Verify that both executables can be launched.

11. Verify the Build Environment

Before starting the VirtualBox build process, verify that the required tools are installed and accessible.

Open a Visual Studio 2022 Developer Command Prompt and check the availability of the relevant executables.

Example:

cl
git --version
python --version
nasm --version
yasm --version

Also verify that the Qt installation, Windows SDK, WDK, WiX Toolset, Open Watcom, Flex/Bison, vcpkg and libvncserver are correctly configured.

Once all dependencies have been installed, proceed to the Building from Source guide.


Note: Some dependencies may require additional configuration in LocalConfig.kmk. Refer to the project's build configuration examples before compiling. c

Clone this wiki locally