Monday 25 September 2023

WIN32_LEAN_AND_MEAN and DuckDB

This keeps striking me every other year when building something from sources.

Got a ton of windows.h-related errors when compiling C++ sources is a typical sign.

The correct way would be to define WIN32_LEAN_AND_MEAN when building:

git clone git@github.com:duckdb/duckdb.git --branch v0.8.1 --single-branch
cd duckdb
python scripts/amalgamation.py
md build
cd build
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Debug -DAMALGAMATION_BUILD=ON -D CMAKE_CXX_FLAGS="/D WIN32_LEAN_AND_MEAN" ..
cmake --build . --config Debug

Wednesday 6 September 2023

Friday 1 September 2023