mongo-cxx-driver and visual studio 2017 and vcpkg

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Windows 10 Professional and Visual Studio 2017 and vcpkg
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I installed the mongo-cxx-driver with the vcpkg successfully and made a new project with Visual Studio 2017 for a Visual C++ console application. I am running with Windows 10 Professional version. I compiled the test sample from the Mongo web site and it all worked perfectly - so great so far.

      I then for my project need to change the default compiler settings to use Struct Member Alignment of 1 byte which is the /Zp1 setting on the
      compiler options. When I do this the same code generates an error when a document is added to the database using the insert_one(). I believe the
      error is thrown in the bson.c file. My question is I do not think the compiler settings for my project should really effect this library. I
      need my main project to use the Struct Member Alignment of 1 since it passed Struct over the network wire to other services/programs which rely on
      packed data so it would be very hard to change that.

        1. codecrash.jpg
          149 kB
          Mark Hodge

            Assignee:
            A. Jesse Jiryu Davis
            Reporter:
            Mark Hodge
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: