Details
Description
I'm trying to build the C++ driver on Windows with the VC compiler, with no luck.
I tried driver versions 3.4.2 (manually downloaded) and 3.5.1 (the stable branch on github).
I configure the build with the following CMake command:
|
cmake -G "Visual Studio 16 2019" -A x64 |
-DCMAKE_CXX_STANDARD=17 |
-DCMAKE_CXX_FLAGS="/Zc:__cplusplus /D_ENABLE_EXTENDED_ALIGNED_STORAGE=1" |
-DBOOST_ROOT="C:/Code/boost_1_73_0" |
-DCMAKE_PREFIX_PATH=C:\mongo-c-driver
|
-DCMAKE_INSTALL_PREFIX=C:\mongo-cxx-driver
|
-DCMAKE_BUILD_TYPE=Release
|
..
|
but I keep getting the following error when I run msbuild.exe ALL_BUILD.vcxproj:
"C:\Code\mongo-cxx-driver-r3.4.2\build\ALL_BUILD.vcxproj" (default target) (1) -> |
"C:\Code\mongo-cxx-driver-r3.4.2\build\src\mongocxx\mongocxx.vcxproj" (default target) (5) -> |
(ClCompile target) ->
|
C:\Code\mongo-cxx-driver-r3.4.2\src\mongocxx\instance.cpp(79,76): error C2338: Must be trivially constructible [C:\Co |
de\mongo-cxx-driver-r3.4.2\build\src\mongocxx\mongocxx.vcxproj] |
|
"C:\Code\mongo-cxx-driver-r3.4.2\build\ALL_BUILD.vcxproj" (default target) (1) -> |
"C:\Code\mongo-cxx-driver-r3.4.2\build\src\mongocxx\mongocxx_mocked.vcxproj" (default target) (6) -> |
C:\Code\mongo-cxx-driver-r3.4.2\src\mongocxx\instance.cpp(79,76): error C2338: Must be trivially constructible [C:\Co |
de\mongo-cxx-driver-r3.4.2\build\src\mongocxx\mongocxx_mocked.vcxproj] |