[CXX-60] Default Windows builds of the C++ client driver to use /MD Created: 19/Feb/14 Updated: 04/May/14 Resolved: 22/Apr/14 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | legacy-0.8.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | legacy-cxx, windows | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Since the windows driver will only be buildable as a DLL (see |
| Comments |
| Comment by Githook User [ 22/Apr/14 ] | |||
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: | |||
| Comment by Githook User [ 22/Apr/14 ] | |||
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: Also, suppress build and consume time warnings for DLL export STL | |||
| Comment by Andrew Morrow (Inactive) [ 21/Apr/14 ] | |||
| Comment by Andrew Morrow (Inactive) [ 21/Apr/14 ] | |||
|
Right, those should say /MD and /MDd. Lack of MSDN is a serious pain today. | |||
| Comment by Eric Milkie [ 21/Apr/14 ] | |||
|
I'm not sure that code example's error message is correct – /MT does not set _DLL, although /MD does. I think... | |||
| Comment by Andrew Morrow (Inactive) [ 21/Apr/14 ] | |||
|
We have STATIC_LIBMONGOCLIENT now, which lets us know if the consumer is intending to build against a static version of the client library. So I think we can add our _DLL check conditioned on the status of STATIC_LIBMONGOCLIENT. In bson.h and dbclient.h:
| |||
| Comment by Eric Milkie [ 19/Feb/14 ] | |||
|
Option: use /MDd in debug mode. Also, we should check the compilation mode in a common header – ensure that _DLL is defined, so that a consumer of the driver cannot compile the header without /MD[d]. |