Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-119

dll attributes should not be applied to the static library build

      A mongo client header file, when included by a consumer, cannot know whether the link step will target a static or shared version of libmongoclient. As a result, it cannot independently determine whether to apply __declspec(dllimport) or not. An incorrect application results in a huge number of warnings.

      Since we don't expect the static library to work well in the first place, the best solution is to create a new #define macro that if present inhibits the application of any import or export macros. Clients intending to use the static library must define this symbol.

      When we observe the symbol in dbclient.h or bson.h, we inhibit MONGOCLIENT_CONSUMER.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: