-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Build
-
None
Currently, when users attempt to link an x86 build of libmongocxx to an x64 build of libmongoc with MSVC, the linker reports several dozen unhelpful unresolved symbol errors and one helpful warning, which gets drowned out in the noise.
Example unhelpful error:
error LNK2019: unresolved external symbol __imp__bson_append_undefined referenced in function "public: void __thiscall bsoncxx::v_noabi::builder::core::append(struct bsoncxx::v_noabi::types::b_undefined const &)"
Example helpful warning:
warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86'
Users commonly run into this issue when building on x64 machines where they fail to pass -G "Visual Studio 14 2015 Win64" to cmake when building mongocxx. On these machines, the default CMake generator is often "Visual Studio 14 2015" (an x86 generator).
It would be helpful to detect this condition earlier in the build process (during time of cmake execution?) and to present a readable error message to the user explaining how to fix the issue.
- duplicates
-
CXX-1286 building mongodbcxx on Windows
- Closed