[CXX-138] For windows builds, consider producing two DLLs, one linked to the debug runtime, with different names Created: 13/Mar/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:
Related
related to CXX-96 Enforce /MD with Windows C++ DLL driver Closed

 Description   

On windows it is often done that you have a 'd' version of a DLL that links to the debugging runtime. We should consider doing something similar when building the DLL client.



 Comments   
Comment by Andrew Morrow (Inactive) [ 22/Apr/14 ]

For future reference, with the above commit in place, you can produce the entire suite of mongoclient library variants with the following invocations. The metavariable $ARGS indicates common arguments used on all compilations (e.g. --64, --cpppath, --libpath, --prefix, etc.).

scons $ARGS install-mongoclient
scons $ARGS install-mongoclient --dbg=on
scons $ARGS install-mongoclient --dynamic-windows --sharedclient
scons $ARGS install-mongoclient --dynamic-windows --sharedclient --dbg=on

Comment by Githook User [ 22/Apr/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: CXX-138 Adorn windows library names with boostesque ABI tags
Branch: legacy
https://github.com/mongodb/mongo-cxx-driver/commit/54ddafd7922883ba6a71ff54a8cdbe8ff0344bee

Comment by Andrew Morrow (Inactive) [ 21/Apr/14 ]

https://github.com/mongodb/mongo-cxx-driver/pull/60

Comment by Andrew Morrow (Inactive) [ 21/Apr/14 ]

I have an idea about how to make this doable, tho perhaps not elegant, by way of multiple SCons invocations. Tentatively pulling into legacy-0.8 to explore the idea.

Comment by Andrew Morrow (Inactive) [ 21/Apr/14 ]

If we do this, we should probably follow the boost library naming conventions. Since all of our libraries require threading, we don't need to vary on -mt, but we should probably produce libraries like:

mongoclient.lib
mongoclient.dll
mongoclient-gd.lib
mongoclient-gd.dll
libmongoclient.lib
libmongoclient-gd.lib
libmongoclient-s.lib
libmongoclient-sgd.lib

If we do this we could also consider enabling boost-style autolib support someday.

To accomplish the above requires a fairly substantial overhaul of the current build system which is not designed to repeatedly build the same targets in varying environments

Generated at Wed Feb 07 21:58:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.