Skip to content

bisht2050/get-started-c

 
 

Repository files navigation

Getting Started with the MongoDB C Driver

Some simple examples using the MongoDB C driver

Build and run

These examples are built using GCC on macOS, but they should compile anywhere that has a C compiler

// URI.h
#define MY_MONGODB_URI "mongodb+srv://<your connection string, including user + password>" 
  • Make the build script executable chmod a+x build-all.sh
  • ./build-all.sh

Build and run with CMake

We can also use CMake to build the programs in this repo. After editing the URI.h, run below commands in the directory:

mkdir build
cd build
cmake ..
cmake --build .

In macOS you need to install Xcode first (free on the Mac App Store)

About

Getting started with the MongoDB C++ driver connecting to MongoDB Atlas

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.4%
  • Shell 5.6%