Version 11.0.0
Building and installing WiredTiger on Windows

Building using Git and GitHub

Skip this step if you are building from a WiredTiger release package, and proceed with Building on Windows

First, clone the repository:

git clone git://github.com/wiredtiger/wiredtiger.git

Now proceed with Building on Windows

Building on Windows

Building WiredTiger on Windows requires CMake as well as the Microsoft Visual C++ compiler in Microsoft Visual Studio 2017.

You can build WiredTiger from source using command-line tools. When compiling via command-line tools, we recommend a prompt/shell that has been appropriately configured with VS toolchain environment variables. We usually recommend using the Visual Studio Developer Command Prompt/Powershell to ensure an appropriately configured environment.

Change directory to the top-level directory, then create and configure a new directory to run your build from:

cd wiredtiger
mkdir build
cd build

Change into your newly created build directory and using CMake run the build configuration step to generate your build.

cmake ..\.

In the absence of an explicit generator, CMake will generate Visual Studio project files (.vcxproj), representing build targets within WiredTiger. To compile the entire WiredTiger project, in the same directory we configured the build, run msbuild:

msbuild ALL_BUILD.vcxproj

To build the python language support, a 64-bit version of Python is required. The required version is referred to as x86-64 on Python.org or x64 on ActiveState Python.

Installing WiredTiger

The WiredTiger software consists of a library and a single standalone utility.

WiredTiger's distribution follows the GNU Coding Standards installation guidelines, and by default WiredTiger builds and installs a static library and dll version of the library.

file <root directory>/bin/
wt.exe: x64 standalone executable
file <root directory>/lib/
libwiredtiger.lib: x64 static library
wiredtiger.lib: x64 import library for dll

To install WiredTiger:

msbuild INSTALL.vcxproj

To install WiredTiger's libraries or binaries into alternate locations, you can use the -DCMAKE_INSTALL_PREFIX configuration option.

cmake -DCMAKE_INSTALL_PREFIX=c:\wiredtiger

Configuring WiredTiger

The WiredTiger software supports some additional configuration options:

-DHAVE_ATTACH=1
Configure WiredTiger to sleep and wait for a debugger to attach on failure. DO NOT configure this option in production environments.
-DHAVE_DIAGNOSTIC=1
Configure WiredTiger to perform various run-time diagnostic tests. DO NOT configure this option in production environments.
-DNON_BARRIER_DIAGNOSTIC_YIELDS=1
Configure WiredTiger to not use memory barriers when yielding threads for diagnostic purposes. Requires that HAVE_DIAGNOSTIC is also enabled. DO NOT configure this option in production environments.
-DENABLE_LZ4=1
Configure WiredTiger for LZ4 compression; see Compressors for more information.
-DENABLE_PYTHON=1
Build the WiredTiger Python API; requires SWIG.
-DENABLE_SNAPPY=1
Configure WiredTiger for snappy compression; see Compressors for more information.
-DENABLE_ZLIB=1
Configure WiredTiger for zlib compression; see Compressors for more information.
-DENABLE_ZSTD=1
Configure WiredTiger for Zstd compression; see Compressors for more information.
-DWT_STANDALONE_BUILD=0
Configure WiredTiger to disable standalone build. Standalone build is enabled by default.

Running WiredTiger C/C++ Tests

The WiredTiger CMake build makes available a suite of C/C++ based tests. To run the available tests you can use our smoke test alias (check). Ensure you're in the build directory and execute:

ctest -C <Debug|Release> -L check

Alternatively to just run all the tests available:

ctest -C <Debug|Release>

In addition, to get verbose output with your test run you can use the -VV flag:

ctest -C <Debug|Release> -VV

If you want to focus on running a specific test (i.e. run a test that may be failing) you can use the -R flag:

# Note: -R specifies a regex, where any matching test will be run
ctest -C <Debug|Release> -R test_name