mongo-cxx-driver/3.8.1

C++ Driver for MongoDB
Recipe info
2023-11-14

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
mongo-cxx-driver/3.8.1

Using mongo-cxx-driver

Note

If you are a new Conan user, we recommend reading the how to consume packages tutorial.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
mongo-cxx-driver/3.8.1
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("mongo-cxx-driver/3.8.1")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): mongocxx
  • CMake target name(s): mongo::mongocxx_static
  • bsoncxx => mongo::bsoncxx_static
    mongocxx => mongo::mongocxx_static
    
  • pkg-config file name(s): mongo-cxx-driver.pc
  • bsoncxx => libbsoncxx-static.pc
    mongocxx => libmongocxx-static.pc
    

A simple use case using the CMake file name and the global target:

# ...
find_package(mongocxx REQUIRED)
# ...
target_link_libraries(YOUR_TARGET mongo::mongocxx_static)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the mongo-cxx-driver homepage listed above:

#include "bsoncxx/array/element.hpp"
#include "bsoncxx/array/value.hpp"
#include "bsoncxx/array/view.hpp"
#include "bsoncxx/array/view_or_value.hpp"
#include "bsoncxx/builder/basic/array.hpp"
#include "bsoncxx/builder/basic/document.hpp"
#include "bsoncxx/builder/basic/helpers.hpp"
#include "bsoncxx/builder/basic/impl.hpp"
#include "bsoncxx/builder/basic/kvp.hpp"
#include "bsoncxx/builder/basic/sub_array.hpp"
#include "bsoncxx/builder/basic/sub_document.hpp"
#include "bsoncxx/builder/concatenate.hpp"
#include "bsoncxx/builder/core.hpp"
#include "bsoncxx/builder/list.hpp"
#include "bsoncxx/builder/stream/array.hpp"
#include "bsoncxx/builder/stream/array_context.hpp"
#include "bsoncxx/builder/stream/closed_context.hpp"
#include "bsoncxx/builder/stream/document.hpp"
#include "bsoncxx/builder/stream/helpers.hpp"
#include "bsoncxx/builder/stream/key_context.hpp"
#include "bsoncxx/builder/stream/single_context.hpp"
#include "bsoncxx/builder/stream/value_context.hpp"
#include "bsoncxx/config/compiler.hpp"
#include "bsoncxx/config/config.hpp"
#include "bsoncxx/config/export.hpp"
#include "bsoncxx/config/postlude.hpp"
#include "bsoncxx/config/prelude.hpp"
#include "bsoncxx/config/version.hpp"
#include "bsoncxx/decimal128.hpp"
#include "bsoncxx/document/element.hpp"
#include "bsoncxx/document/value.hpp"
#include "bsoncxx/document/view.hpp"
#include "bsoncxx/document/view_or_value.hpp"
#include "bsoncxx/enums/binary_sub_type.hpp"
#include "bsoncxx/enums/type.hpp"
#include "bsoncxx/exception/error_code.hpp"
#include "bsoncxx/exception/exception.hpp"
#include "bsoncxx/json.hpp"
#include "bsoncxx/oid.hpp"
#include "bsoncxx/stdx/make_unique.hpp"
#include "bsoncxx/stdx/optional.hpp"
#include "bsoncxx/stdx/string_view.hpp"
#include "bsoncxx/string/to_string.hpp"
#include "bsoncxx/string/view_or_value.hpp"
#include "bsoncxx/types.hpp"
#include "bsoncxx/types/bson_value/make_value.hpp"
#include "bsoncxx/types/bson_value/value.hpp"
#include "bsoncxx/types/bson_value/view.hpp"
#include "bsoncxx/types/bson_value/view_or_value.hpp"
#include "bsoncxx/types/value.hpp"
#include "bsoncxx/util/functor.hpp"
#include "bsoncxx/validate.hpp"
#include "bsoncxx/view_or_value.hpp"
#include "mongocxx/bulk_write.hpp"
#include "mongocxx/change_stream.hpp"
#include "mongocxx/client.hpp"
#include "mongocxx/client_encryption.hpp"
#include "mongocxx/client_session.hpp"
#include "mongocxx/collection.hpp"
#include "mongocxx/config/compiler.hpp"
#include "mongocxx/config/config.hpp"
#include "mongocxx/config/export.hpp"
#include "mongocxx/config/postlude.hpp"
#include "mongocxx/config/prelude.hpp"
#include "mongocxx/config/version.hpp"
#include "mongocxx/cursor.hpp"
#include "mongocxx/database.hpp"
#include "mongocxx/events/command_failed_event.hpp"
#include "mongocxx/events/command_started_event.hpp"
#include "mongocxx/events/command_succeeded_event.hpp"
#include "mongocxx/events/heartbeat_failed_event.hpp"
#include "mongocxx/events/heartbeat_started_event.hpp"
#include "mongocxx/events/heartbeat_succeeded_event.hpp"
#include "mongocxx/events/server_changed_event.hpp"
#include "mongocxx/events/server_closed_event.hpp"
#include "mongocxx/events/server_description.hpp"
#include "mongocxx/events/server_opening_event.hpp"
#include "mongocxx/events/topology_changed_event.hpp"
#include "mongocxx/events/topology_closed_event.hpp"
#include "mongocxx/events/topology_description.hpp"
#include "mongocxx/events/topology_opening_event.hpp"
#include "mongocxx/exception/authentication_exception.hpp"
#include "mongocxx/exception/bulk_write_exception.hpp"
#include "mongocxx/exception/error_code.hpp"
#include "mongocxx/exception/exception.hpp"
#include "mongocxx/exception/gridfs_exception.hpp"
#include "mongocxx/exception/logic_error.hpp"
#include "mongocxx/exception/operation_exception.hpp"
#include "mongocxx/exception/query_exception.hpp"
#include "mongocxx/exception/server_error_code.hpp"
#include "mongocxx/exception/write_exception.hpp"
#include "mongocxx/gridfs/bucket.hpp"
#include "mongocxx/gridfs/downloader.hpp"
#include "mongocxx/gridfs/uploader.hpp"
#include "mongocxx/hint.hpp"
#include "mongocxx/index_model.hpp"
#include "mongocxx/index_view.hpp"
#include "mongocxx/instance.hpp"
#include "mongocxx/logger.hpp"
#include "mongocxx/model/delete_many.hpp"
#include "mongocxx/model/delete_one.hpp"
#include "mongocxx/model/insert_one.hpp"
#include "mongocxx/model/replace_one.hpp"
#include "mongocxx/model/update_many.hpp"
#include "mongocxx/model/update_one.hpp"
#include "mongocxx/model/write.hpp"
#include "mongocxx/options/aggregate.hpp"
#include "mongocxx/options/apm.hpp"
#include "mongocxx/options/auto_encryption.hpp"
#include "mongocxx/options/bulk_write.hpp"
#include "mongocxx/options/change_stream.hpp"
#include "mongocxx/options/client.hpp"
#include "mongocxx/options/client_encryption.hpp"
#include "mongocxx/options/client_session.hpp"
#include "mongocxx/options/count.hpp"
#include "mongocxx/options/create_collection.hpp"
#include "mongocxx/options/data_key.hpp"
#include "mongocxx/options/delete.hpp"
#include "mongocxx/options/distinct.hpp"
#include "mongocxx/options/encrypt.hpp"
#include "mongocxx/options/estimated_document_count.hpp"
#include "mongocxx/options/find.hpp"
#include "mongocxx/options/find_one_and_delete.hpp"
#include "mongocxx/options/find_one_and_replace.hpp"
#include "mongocxx/options/find_one_and_update.hpp"
#include "mongocxx/options/find_one_common_options.hpp"
#include "mongocxx/options/gridfs/bucket.hpp"
#include "mongocxx/options/gridfs/upload.hpp"
#include "mongocxx/options/index.hpp"
#include "mongocxx/options/index_view.hpp"
#include "mongocxx/options/insert.hpp"
#include "mongocxx/options/pool.hpp"
#include "mongocxx/options/range.hpp"
#include "mongocxx/options/replace.hpp"
#include "mongocxx/options/rewrap_many_datakey.hpp"
#include "mongocxx/options/server_api.hpp"
#include "mongocxx/options/ssl.hpp"
#include "mongocxx/options/tls.hpp"
#include "mongocxx/options/transaction.hpp"
#include "mongocxx/options/update.hpp"
#include "mongocxx/pipeline.hpp"
#include "mongocxx/pool.hpp"
#include "mongocxx/read_concern.hpp"
#include "mongocxx/read_preference.hpp"
#include "mongocxx/result/bulk_write.hpp"
#include "mongocxx/result/delete.hpp"
#include "mongocxx/result/gridfs/upload.hpp"
#include "mongocxx/result/insert_many.hpp"
#include "mongocxx/result/insert_one.hpp"
#include "mongocxx/result/replace_one.hpp"
#include "mongocxx/result/rewrap_many_datakey.hpp"
#include "mongocxx/result/update.hpp"
#include "mongocxx/stdx.hpp"
#include "mongocxx/uri.hpp"
#include "mongocxx/validation_criteria.hpp"
#include "mongocxx/write_concern.hpp"
#include "mongocxx/write_type.hpp"