Details
-
Bug
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
Description
In order to prevent build mistakes, the C++ driver should ensure that _MD is defined, since we are compiling the shared library with /MD. This ensures that the same C RTL (and thus the same heap) is used across all translation units between the mongo library and the client code:
#if( !defined(_MD) )
|
#error _MD is not defined
|
#endif
|
We're already doing this in version.cpp, but of course this code isn't hit by consumers of the C++ driver. It needs to be in a header.
Also, confusingly, we are using /MDd for debug mode; I think this ought to be /MTd, since we're not building a DLL. This could cause weirdness if driver developers didn't also use /MDd.
Attachments
Issue Links
- is related to
-
CXX-60 Default Windows builds of the C++ client driver to use /MD
-
- Closed
-
-
CXX-138 For windows builds, consider producing two DLLs, one linked to the debug runtime, with different names
-
- Closed
-
- related to
-
SERVER-9770 Allow windows builds to use the dynamic C and C++ runtime libraries
-
- Closed
-