duckdb / duckdb/extension-template

Building DuckDB extensions on Windows?

Open
#123 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
290
Forks
116
PR merge metrics
No merged PRs in 30d

Description

I'm currently developing a new extension for DuckDB, and while everything builds smoothly on Linux, I'm running into issues getting it to compile on Windows.

## Linux

On Linux, after following the [README instructions](https://github.com/duckdb/extension-template?tab=readme-ov-file#building), I can easily build the extension from the project root using:

```bash
# from project root folder
make
```

The build completes successfully, the tests run, and the compiled extension is located at: `./build/release/extension//.duckdb_extension`.

Perfect!

## Windows

However, things are more complicated on Windows, since `make` isn't available and we need to use `cmake` instead.

For the DuckDB core itself, the [Windows build documentation](https://duckdb.org/docs/stable/dev/building/windows.html) is thorough. With some setup (including the usual `vcpkg` quirks), I can build DuckDB like this:

```powershell
# run from ./duckdb directory
cmake `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_GENERATOR_PLATFORM=x64 `
-DENABLE_EXTENSION_AUTOLOADING=1 `
-DENABLE_EXTENSION_AUTOINSTALL=1 `
-DDUCKDB_EXTENSION_CONFIGS="${GITHUB_WORKSPACE}/.github/config/bundled_extensions.cmake" `
-DDISABLE_UNITY=1 `
-DOVERRIDE_GIT_DESCRIBE="$OVERRIDE_GIT_DESCRIBE"
cmake --build . --config Release --parallel
```

The problem is, **I can't find any clear instructions on how to build or test a DuckDB extension on Windows**.

Any guidance would be much appreciated.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the extension-template README's building section and the linked DuckDB Windows build documentation. Determine the supported Windows commands for building and testing an extension, including where the compiled extension is produced, then document those steps in the appropriate project documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system, documentation, operating-systems
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.