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

Conflict with <windows.h>. Different include order lead to different result.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 3.3.1
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
    • Environment:
      OS: windows 10
      compiler: visual studio 2017

      Description

       

      #include <mongocxx/client.hpp>
      #include <windows.h>
      int main() {
          return 0;
      }
      


       This can complie success.

      #include <windows.h>
      #include <mongocxx/client.hpp>
      int main() {
          return 0;
      }
      

      This cause strange error.
      Error (active) E0145 member "bsoncxx::v_noabi::types::b_double::type_id" may not be initialized.

        Attachments

        1. buildOutput.txt
          27 kB
        2. CMakeLists.txt
          0.9 kB
        3. main.cpp
          0.1 kB

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            drinkmystery drink
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: