File: README.md

package info (click to toggle)
mongo-cxx-driver 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 13,832 kB
  • sloc: cpp: 61,365; python: 1,436; sh: 356; xml: 253; perl: 215; makefile: 21
file content (21 lines) | stat: -rw-r--r-- 867 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# MongoDB CXX Driver examples

## Prerequisites

* `libmongoc` (see the [installation guide](https://mongoc.org/libmongoc/current/installing.html))

## Building code examples

1. Run `git clone https://github.com/mongodb/mongo-cxx-driver && cd mongo-cxx-driver/build`
2. Follow the instructions [here](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/installation/) to install the driver
3. Run `make examples`
4. cd `examples/mongocxx`
5. Start up `mongod` running on the default port (i.e. 27017)
6. Run an example file (e.g. `./aggregate`)

## Building project examples

1. Install `libmongoc` and `mongocxx` following the [installation
   instructions](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/installation/)
2. Change to one of the project example directories, e.g. `examples/projects/cmake/mongocxx/shared`
3. Run `./build.sh`