Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3656

Calling convention attributes must be included on function definitions

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • Labels:
      None

      Compiling with VS 2017 using /Gv, which overrides the default calling convention, output many many errors like so:

       c:\data\mci\ee4d4a8fcc4cc8cd7bc7dec05224e73c\mongoc\src\libbson\src\bson\bson-value.c(25): error C2373: 'bson_value_copy': redefinition; different type modifiers [C:\data\mci\ee4d4a8fcc4cc8cd7bc7dec05224e73c\mongoc\src\libbson\bson_static.vcxproj]
      

      I believe this is due to the __cdecl attribute being included in the header declaration (via BSON_CALL), but not the function definitions.

      Patch build with /Gv: https://evergreen.mongodb.com/task/mongo_c_driver_windows_2017_debug_compile_alt_calling_convention_patch_3da9e662303a488773559ba8ef34fd1d70d0d092_5eb326350ae60671ae9196af_20_05_06_21_04_01

            Assignee:
            Unassigned Unassigned
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: