[SERVER-3364] The C++ Driver compiled as shared library must export the API Created: 04/Jul/11 Updated: 12/Jul/16 Resolved: 24/Jan/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Client |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.5 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Balint Szente | Assignee: | Mark Benvenuto |
| Resolution: | Done | Votes: | 1 |
| Labels: | Windows, api, c++, dll, driver, export, mongoclient | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Microsoft Windows |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
The C++ mongoclient target supports the shared library generation, however no exports are added to the generated DLL. I took Little Max's patch and ported to 1.8.2 and modified a little bit to export only the necessary API-s: the public functions and static members. You should verify/correct whether all the necessary symbols are exported: maybe I missed some functions that we do not use in our project, but make part of the public API. Please note that my patch assumes by default that you want to use the headers as dllimport (I think this should be the common case). For linking with the static mongoclient library the MONGO_LIB macro must be defined before including the dbclient.h (or any other header). MCI build without Sconscript.client changes MCI build with Sconscript.client changes |
| Comments |
| Comment by Githook User [ 23/Jan/14 ] | ||
|
Author: {u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}Message: | ||
| Comment by Githook User [ 14/Jan/14 ] | ||
|
Author: {u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}Message: | ||
| Comment by Githook User [ 28/Dec/13 ] | ||
|
Author: {u'username': u'ranjaykrishna', u'name': u'Ranjay Krishna', u'email': u'rak248@cornell.edu'}Message: build all the sharedclient programs using the new macro MONGO_CLIENT_API in mongo/client/export_macros.h Signed-off-by: Matt Kangas <matt.kangas@mongodb.com> | ||
| Comment by Githook User [ 10/Dec/13 ] | ||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: | ||
| Comment by Githook User [ 10/Dec/13 ] | ||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: | ||
| Comment by Githook User [ 09/Dec/13 ] | ||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: Also addresses | ||
| Comment by Githook User [ 09/Dec/13 ] | ||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: Also MONGO_COMPILER_API_EXPORT Puts the "export visibility" declaration on a type, MONGO_COMPILER_API_IMPORT Puts the "import from library" declaration on a type, MONGO_COMPILER_API_CALLING_CONVENTION Labels a function declaration with its | ||
| Comment by Githook User [ 05/Dec/13 ] | ||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: This deduplicates documentation, hopefully preventing the documentation from diverging. | ||
| Comment by Balint Szente [ 09/Nov/11 ] | ||
|
Patch for r1.8.4, changes:
Usage:
| ||
| Comment by Balint Szente [ 07/Jul/11 ] | ||
|
A new version of the patch, which exports also the bson/oid.h APIs and the SConscript is modified to generate PDB file in release mode too. |