"Procedure entry point cannot be located" error with mongocxx 3.7.1

I have Qt application that uses mongocxx 3.4.0 driver. I am trying to update the driver to 3.7.1.

On Windows 10, successfully built 64-bit mongocxx 3.7.1 from source code, using MSYS with gcc, g++ 11.20.
Substituted 3.4.0 dll’s with freshly built ones, compiled the application with new libraries.
Compilation is successful, however, when I run the app, the following error occurs at the startup:

“The procedure entry point _ZN7bsoncxx7v_noabi5types10bson_value4viewD1Ev could not be located in the dynamic link library”.

Demagled symbol in the error is bsoncxx::v_noabi::types::bson_value::view::~view().
I experience the same issue with mongocxx 3.6.0, but not with 3.4.2. I see there was folders structure reorganisation in include/bsoncxx/v_noiabi/bsoncxx/types between these versions.

I get the same error when I try to execute bsoncxx/view_and_value.exe example code inside mongocxx build. That probably proves that the problem is not with Qt application.
Please advise what am I missing to make this work. Thank you for your help.

In case you need building info,
cmake flags used to build 3.7.1 driver:

-G “MSYS Makefiles” -DCMAKE_BUILD_TYPE=Release -DBSONCXX_POLY_USE_BOOST=1 -DBUILD_VERSION=3.7.1 -DBOOSTROOT=C:/dev/boost/boost_1_82_0 -DCMAKE_PREFIX_PATH=C:/dev/mongodb/mongo-c-driver/install -DCMAKE_INSTALL_PREFIX=C:/dev/mongodb/mongo-cxx-driver/install

configuration output:

– The C compiler identification is GNU 11.2.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: C:/Qt/Tools/mingw1120_64/bin/gcc.exe - skipped
– Detecting C compile features
– Detecting C compile features - done
bsoncxx version: 3.7.1
found libbson version 1.23.3
– Found Boost: C:/dev/boost/boost_1_82_0 (found suitable version “1.82.0”, minimum required is “1.56.0”)
mongocxx version: 3.7.1
found libmongoc version 1.23.3
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
– Found Threads: TRUE
– Build files generated for:
– build system: MSYS Makefiles
– Configuring done (2.2s)
– Generating done (1.0s)
– Build files have been written to: C:/dev/mongodb/mongo-cxx-driver/build

Hi @Yana_K

Are you using same headers for compiling the library and using the dll?

Yes, I copied everything from installation folder to my app resources. And, application aside, I see the same error with bsonxx view_and_value example, where my app is not involved.