Looking back I wonder if I might be missing dependencies even earlier in the toolchain.
I repeated the steps of recompiling the underlying C driver but even at the first step had missing stdlib headers (although not sure why cmake can’t find them as they’re definitly installed and the path seems to be comprehensive enough to cover them?)
Also despite a clean install of Strawberry Perl it still didn’t find the libzstd module which I presume is also related to the zlib error above that - although I can’t find any documentation on what needs to be installed there (it’s not listed as a dependency on the install page: Installing the MongoDB C Driver (libmongoc) and BSON library (libbson) — libmongoc 1.23.2)
Is there a precompiled package for windows I can use to just install the library/drivers? The only ones I have been able to track down are for Linux or Mac which I can’t use for this project.
C:\Users\dgm55\source\repos\mongo-c-driver\cmake-build>cmake .. -G "Visual Studio 17 2022" -A x64 -DBUILD_VERSION=3.6.0 -DBOOST_ROOT=C:\Users\dgm55\source\repos\boost_1_81_0 -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS="/Zc:__cplusplus" -DCMAKE_PREFIX_PATH=C:\Users\dgm55\source\repos\mongo-c-driver -DCMAKE_INSTALL_PREFIX=C:\Users\dgm55\source\repos\mongo-c-driver
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.34.31937.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for a CXX compiler
-- Looking for a CXX compiler - C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe
-- The CXX compiler identification is MSVC 19.34.31937.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
storing BUILD_VERSION 3.6.0 in file VERSION_CURRENT for later use
-- Build and install static libraries
-- Found Python3: C:/Users/dgm55/AppData/Local/Programs/Python/Python311/python.exe (found version "3.11.2") found components: Interpreter
-- Using bundled libbson
libbson version (from VERSION_CURRENT file): 3.6.0
-- Looking for snprintf
-- Looking for snprintf - found
-- Performing Test BSON_HAVE_TIMESPEC
-- Performing Test BSON_HAVE_TIMESPEC - Success
-- struct timespec found
-- Looking for gmtime_r
-- Looking for gmtime_r - not found
-- Looking for rand_r
-- Looking for rand_r - not found
-- Looking for strings.h
-- Looking for strings.h - not found
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
libmongoc version (from VERSION_CURRENT file): 3.6.0
-- Searching for zlib CMake packages
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Enabling zlib compression (bundled)
-- Looking for include file unistd.h
-- Looking for include file unistd.h - not found
-- Looking for include file stdarg.h
-- Looking for include file stdarg.h - found
-- Searching for compression library zstd
-- Found PkgConfig: D:/StrawberryPerl/perl/bin/pkg-config.bat (found version "0.26")
-- Checking for module 'libzstd'
-- Can't find libzstd.pc in any of D:/StrawberryPerl/c/lib/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
-- Not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of socklen_t
-- Check size of socklen_t - done
-- Looking for sched_getcpu
-- Looking for sched_getcpu - not found
-- Searching for compression library header snappy-c.h
-- Not found (specify -DCMAKE_INCLUDE_PATH=/path/to/snappy/include for Snappy compression)
-- No ICU library found, SASLPrep disabled for SCRAM-SHA-256 authentication.
-- If ICU is installed in a non-standard directory, define ICU_ROOT as the ICU installation path.
Searching for libmongocrypt
-- libmongocrypt not found. Configuring without Client-Side Field Level Encryption support.
-- Performing Test MONGOC_HAVE_SS_FAMILY
-- Performing Test MONGOC_HAVE_SS_FAMILY - Failed
-- Compiling against Secure Channel
-- Compiling against Windows SSPI
-- Building with MONGODB-AWS auth support
-- Build files generated for:
-- build system: Visual Studio 17 2022
-- instance: C:/Program Files/Microsoft Visual Studio/2022/Community
-- instance: x64
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BOOST_ROOT
-- Build files have been written to: C:/Users/dgm55/source/repos/mongo-c-driver/cmake-build