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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • 3.3.1
    • Documentation
    • 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

            Unassigned Unassigned
            drinkmystery drink
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: