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

Document stream is not available

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: 3.3.0
    • Fix Version/s: None
    • Component/s: BSON
    • Labels:
      None
    • Environment:
      Linux Mint 19.1 - XFCE

      Description

      I have installed Mongo CXX driver and added the following headers in my application:

      ```cpp
      #include <bsoncxx/json.hpp>

      #include <mongocxx/stdx.hpp>
      ```
       
      When I try to create a document using `bsoncxx::builder::stream`, I receive the following error:
       
      ```sh
      error: ‘bsoncxx::v_noabi::builder::stream’ has not been declared
      ```
       
      If I open the code in /usr/local/include/bsoncxx/v_noabi/bsoncxx/builder/basic/helpers.hpp , only the basic is available:
       
      ```cpp
      #pragma once

      #include <bsoncxx/builder/concatenate.hpp>

      #include <bsoncxx/config/prelude.hpp>

      namespace bsoncxx {

      BSONCXX_INLINE_NAMESPACE_BEGIN

      namespace builder {

      namespace basic

      { using bsoncxx::builder::concatenate; }

      // namespace basic

      } // namespace builder

      BSONCXX_INLINE_NAMESPACE_END

      } // namespace bsoncxx

      #include <bsoncxx/config/postlude.hpp>
      ```
       
      Am I importing from the wrong place, or is a error in this version / I made the installation of a wrong way ? How can I fix this and use the stream (for documents that has binary field(s), is it the basic recommended ?)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: