Many classes use the BSONCXX_API macro to export symbols related to its members.
This pattern does not account for the required BSONCXX_CALL macro on function symbols to support users on Windows building with a different default calling convention than __cdecl (e.g. __stdcall, __fastcall, etc.). This is outlined in CXX-81.
Executables under the examples subdirectory are compiled with /Gv to test for the absence of __cdecl in the API. However, the API coverage of examples is very small compared to the library test suites: see CXX-3092. Attempting to increasing API coverage in examples as part of CXX-3082 triggered build failures (as intended) due to missing __cdecl.
Audit the set of exported symbols in the current C++ Driver API and ensure functions are declared with __cdecl as required.
- is depended on by
-
CXX-3082 Add comprehensive examples to interface documentation
- Closed
-
CXX-3092 Build test executables with __vectorcall as default calling convention
- Closed
- is related to
-
CXX-81 On Windows, MONGO_API functions should be decorated with __cdecl.
- Closed
-
CDRIVER-5678 mongoc_log_func_t is missing __cdecl
- Backlog
- related to
-
CXX-3171 Remove obsolete export macros
- Closed
-
CXX-3174 Revert stray include-guard-conditioned macro guards in mongocxx
- Closed