Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3364

The C++ Driver compiled as shared library must export the API

    XMLWordPrintableJSON

Details

    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

      Attachments

        1. mongodb-src-r1.8.2_dll_oid_pdb.patch
          63 kB
        2. mongodb-src-r1.8.2_dll.patch
          61 kB
        3. mongodb-src-r1.8.4_dll.patch
          66 kB

        Issue Links

          Activity

            People

              mark.benvenuto@mongodb.com Mark Benvenuto
              bszente Balint Szente
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: