Docs Menu
Docs Home
/ / /
C++ Driver

Upgrade Driver Versions

On this page

  • Overview
  • Breaking Changes

This page describes the changes you must make to your application when you upgrade to a new version of the C++ driver.

Before you upgrade, perform the following actions:

  • Ensure the new C++ driver version is compatible with the MongoDB Server versions your application connects to and the C++ standard version your application compiles with. For version compatibility information, see the C++ driver Compatibility page.

  • Address any breaking changes between the driver version your application is using and your planned upgrade version in the Breaking Changes section.

Tip

To ensure compatibility across MongoDB Server versions when upgrading driver versions, use the Stable API.

Note

The C++ driver follows semantic versioning. The driver may break build system or package compatibility in any release. Patch releases may revert accidental API breaking changes.

For more information, see API and ABI Versioning.

A breaking change is a change of a convention or a behavior starting in a specific version of the driver. This type of change may prevent your application from working properly if not addressed before upgrading the driver.

The breaking changes in this section are categorized by the driver version that introduced them. When upgrading driver versions, address all the breaking changes between the current and upgrade versions.

Example

Upgrading from Version 3.0

If you're upgrading the C++ driver from version 3.0 to version 3.10, address all breaking changes listed for versions 3.1 to 3.10, if any.

This driver version introduces the following breaking changes:

  • Drops support for find_package(libbsoncxx) and find_package(libmongocxx). Use find_package(bsoncxx) and find_package(mongocxx) instead.

  • Drops support for the LIBBSONCXX_* and LIBMONGOCXX_* CMake variables provided by the legacy CMake package config files. Use the mongo::bsoncxx_* and mongo::mongocxx_* CMake targets instead.

  • Removes the experimental C++ standard library (BSONCXX_POLY_USE_STD_EXPERIMENTAL) as a polyfill option.

This driver version introduces the following breaking changes:

  • Removes support for exported targets from the CMake project build tree

  • Drops support for macOS 10.14, macOS 10.15, and Ubuntu 14.04

  • Requires MongoDB C Driver v1.25.0 or later

  • Requires CMake v3.15 or later

For driver versions 3.8 and earlier, see the release notes and associated JIRA tickets for each release on GitHub.

Back

What's New