I tried removing the files and doing a reinstall of the C driver build.
using c:\msys64\ming64.exe
i installed the dependencies with
pacman --noconfirm -Syu
pacman --noconfirm -S mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake
pacman --noconfirm -S mingw-w64-x86_64-extra-cmake-modules make tar
pacman --noconfirm -S mingw64/mingw-w64-x86_64-cyrus-sasl
then i ran these commands after untaring the build
mkdir cmake-build
cd cmake-build
CC=/mingw64/bin/gcc.exe /mingw64/bin/cmake -G “MSYS Makefiles” -DCMAKE_INSTALL_PREFIX=“C:/mongo-c-driver” -DCMAKE_C_FLAGS=“-D__USE_MINGW_ANSI_STDIO=1” …
make install
there is a character limit, so pasting 20 pages of install output wont fit, but i’ll try to paste the main points
agovan@LENOVO-AKASH MINGW64 ~
$ curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.16.2/mongo-c-driver-1.16.2.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 637 100 637 0 0 1151 0 --:–:-- --:–:-- --:–:-- 1149
100 6726k 100 6726k 0 0 2164k 0 0:00:03 0:00:03 --:–:-- 3334k
agovan@LENOVO-AKASH MINGW64 ~
$ tar xzf mongo-c-driver-1.16.2.tar.gz
agovan@LENOVO-AKASH MINGW64 ~
$ cd mongo-c-driver-1.16.2
agovan@LENOVO-AKASH MINGW64 ~/mongo-c-driver-1.16.2
$ mkdir cmake-build
agovan@LENOVO-AKASH MINGW64 ~/mongo-c-driver-1.16.2
$ cd cmake-build
agovan@LENOVO-AKASH MINGW64 ~/mongo-c-driver-1.16.2/cmake-build
$ CC=/mingw64/bin/gcc.exe /mingw64/bin/cmake -G “MSYS Makefiles” -DCMAKE_INSTALL_PREFIX=“C:/mongo-c-driver” -DCMAKE_C_FLAGS=“-D__USE_MINGW_ANSI_STDIO=1” …
– The C compiler identification is ;GNU 10.1.0
– Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe
– Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe - works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– No CMAKE_BUILD_TYPE selected, defaulting to RelWithDebInfo
file VERSION_CURRENT contained BUILD_VERSION 1.16.2
– Using bundled libbson
libbson version (from VERSION_CURRENT file): 1.16.2
– Check if the system is big endian
– Searching 16 bit integer
– 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 unsigned short
– Check size of unsigned short - done
– Searching 16 bit integer - Using unsigned short
– Check if the system is big endian - little endian
– Looking for snprintf
– Looking for snprintf - found
– Looking for reallocf
– Looking for reallocf - not 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 - found
– Looking for strlcpy
– Looking for strlcpy - not found
– Looking for clock_gettime
– Looking for clock_gettime - found
– Looking for strnlen
– Looking for strnlen - found
– Looking for stdbool.h
– Looking for stdbool.h - found
– Looking for SYS_gettid
– Looking for SYS_gettid - not found
– Looking for syscall
– Looking for syscall - not found
– Performing Test HAVE_ATOMIC_32_ADD_AND_FETCH
– Performing Test HAVE_ATOMIC_32_ADD_AND_FETCH - Success
– Performing Test HAVE_ATOMIC_64_ADD_AND_FETCH
– Performing Test HAVE_ATOMIC_64_ADD_AND_FETCH - Success
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
– Found Threads: TRUE
libmongoc version (from VERSION_CURRENT file): 1.16.2
– Searching for zlib CMake packages
– Found ZLIB: C:/msys64/mingw64/lib/libz.dll.a (found version “1.2.11”)
– zlib found version “1.2.11”
– zlib include path “C:/msys64/mingw64/include”
– zlib libraries “C:/msys64/mingw64/lib/libz.dll.a”
– Looking for include file unistd.h
– Looking for include file unistd.h - found
– Looking for include file stdarg.h
– Looking for include file stdarg.h - found
– Searching for compression library zstd
– Found PkgConfig: C:/msys64/mingw64/bin/pkg-config.exe (found version “0.29.2”)
– Checking for module ‘libzstd’
– Found libzstd, version 1.4.4
– Found zstd version 1.4.4 in C:/msys64/mingw64/include
– 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
– Configuring done
– Generating done
– Build files have been written to: C:/msys64/home/agovan/mongo-c-driver-1.16.2/cmake-build
agovan@LENOVO-AKASH MINGW64 ~/mongo-c-driver-1.16.2/cmake-build
$ make install
Scanning dependencies of target bson_shared
[ 1%] Building C object src/libbson/CMakeFiles/bson_shared.dir/src/bson/bcon.c.obj
[16 pages of installing from 1% to 100 % here, which will exceed the post character limit]
[100%] Built target bulk1
Install the project…
– Install configuration: “RelWithDebInfo”
– Installing: C:/mongo-c-driver/share/mongo-c-driver/COPYING
– Installing: C:/mongo-c-driver/share/mongo-c-driver/NEWS
– Installing: C:/mongo-c-driver/share/mongo-c-driver/README.rst
– Installing: C:/mongo-c-driver/share/mongo-c-driver/THIRD_PARTY_NOTICES
– Installing: C:/mongo-c-driver/lib/libbson-1.0.dll.a
– Installing: C:/mongo-c-driver/bin/libbson-1.0.dll
– Installing: C:/mongo-c-driver/lib/libbson-static-1.0.a
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-config.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-version.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bcon.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-atomic.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-clock.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-compat.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-context.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-decimal128.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-endian.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-error.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-iter.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-json.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-keys.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-macros.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-md5.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-memory.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-oid.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-prelude.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-reader.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-string.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-types.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-utf8.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-value.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-version-functions.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson/bson-writer.h
– Installing: C:/mongo-c-driver/include/libbson-1.0/bson.h
– Installing: C:/mongo-c-driver/lib/pkgconfig/libbson-1.0.pc
– Installing: C:/mongo-c-driver/lib/pkgconfig/libbson-static-1.0.pc
– Installing: C:/mongo-c-driver/lib/cmake/bson-1.0/bson-targets.cmake
– Installing: C:/mongo-c-driver/lib/cmake/bson-1.0/bson-targets-relwithdebinfo.cmake
– Installing: C:/mongo-c-driver/lib/cmake/bson-1.0/bson-1.0-config.cmake
– Installing: C:/mongo-c-driver/lib/cmake/bson-1.0/bson-1.0-config-version.cmake
– Installing: C:/mongo-c-driver/lib/cmake/libbson-1.0/libbson-1.0-config.cmake
– Installing: C:/mongo-c-driver/lib/cmake/libbson-1.0/libbson-1.0-config-version.cmake
– Installing: C:/mongo-c-driver/lib/cmake/libbson-static-1.0/libbson-static-1.0-config.cmake
– Installing: C:/mongo-c-driver/lib/cmake/libbson-static-1.0/libbson-static-1.0-config-version.cmake
– Installing: C:/mongo-c-driver/lib/libmongoc-1.0.dll.a
– Installing: C:/mongo-c-driver/bin/libmongoc-1.0.dll
– Installing: C:/mongo-c-driver/lib/libmongoc-static-1.0.a
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-config.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-version.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-apm.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-bulk-operation.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-change-stream.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-client.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-client-pool.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-client-side-encryption.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-collection.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-cursor.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-database.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-error.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-flags.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-find-and-modify.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-gridfs.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-gridfs-bucket.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-gridfs-file.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-gridfs-file-page.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-gridfs-file-list.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-handshake.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-host-list.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-init.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-index.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-iovec.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-log.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-macros.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-matcher.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-opcode.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-prelude.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-read-concern.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-read-prefs.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-server-description.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-client-session.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-socket.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-stream-tls-libressl.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-stream-tls-openssl.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-stream.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-stream-buffered.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-stream-file.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-stream-gridfs.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-stream-socket.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-topology-description.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-uri.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-version-functions.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-write-concern.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-rand.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-stream-tls.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc/mongoc-ssl.h
– Installing: C:/mongo-c-driver/include/libmongoc-1.0/mongoc.h
– Installing: C:/mongo-c-driver/lib/pkgconfig/libmongoc-1.0.pc
– Installing: C:/mongo-c-driver/lib/pkgconfig/libmongoc-static-1.0.pc
– Installing: C:/mongo-c-driver/lib/pkgconfig/libmongoc-ssl-1.0.pc
– Installing: C:/mongo-c-driver/lib/cmake/mongoc-1.0/mongoc-targets.cmake
– Installing: C:/mongo-c-driver/lib/cmake/mongoc-1.0/mongoc-targets-relwithdebinfo.cmake
– Installing: C:/mongo-c-driver/lib/cmake/mongoc-1.0/mongoc-1.0-config.cmake
– Installing: C:/mongo-c-driver/lib/cmake/mongoc-1.0/mongoc-1.0-config-version.cmake
– Installing: C:/mongo-c-driver/lib/cmake/libmongoc-1.0/libmongoc-1.0-config.cmake
– Installing: C:/mongo-c-driver/lib/cmake/libmongoc-1.0/libmongoc-1.0-config-version.cmake
– Installing: C:/mongo-c-driver/lib/cmake/libmongoc-static-1.0/libmongoc-static-1.0-config.cmake
– Installing: C:/mongo-c-driver/lib/cmake/libmongoc-static-1.0/libmongoc-static-1.0-config-version.cmake
– Installing: C:/mongo-c-driver/share/mongo-c-driver/uninstall.cmd
i fixed my commands after that, but i still get the same error message as my first post
curl -OL https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.5.0/mongo-cxx-driver-r3.5.0.tar.gz
tar -xzf mongo-cxx-driver-r3.5.0.tar.gz
cd mongo-cxx-driver-r3.5.0/build
‘C:\Program Files\CMake\bin\cmake.exe’ …
-DBOOST_ROOT=C:\local\boost_1_73_0
-DCMAKE_PREFIX_PATH=C:\mongo-c-driver
-DCMAKE_INSTALL_PREFIX=C:\mongo-cxx-driver
one thing i wanted to ask is this cmake command supposed to be building for Visual Studio 15 2017 with -G “Visual Studio 15 2017 Win64”, or should i be using something else if i want it to work in QT creator with mingw?
Im not sure if this may be relevant to my issue, but there is no file called libmongoc in my C:\mongo-c-driver folder, although there appear to be files related to it in the sub folders