MongoDB 4.6.1 C + + driver compilation

Source: Internet
Author: User
Tags git clone

This version is not the same as before, there is a dedicated GitHub project.

Https://github.com/mongodb/mongo-cxx-driver

First get the source code:

git clone https://github.com/mongodb/mongo-cxx-driver.git

Then switch branches:

git checkout 26compat

Then compile with the following command:

SCons--prefix=/usr--use-system-boost--sharedclient--full install-mongoclient

This command compiles the. So and. A libraries, which are located in the build directory:

# ls build/linux2/use-system-boost/libmongoclient.a-alh-rw-r--r--1 root root 57M  May 23:35 build/linux2/ use-system-boost/libmongoclient.a# ls build/linux2/use-system-boost/libmongoclient.so-alh-rwxr-xr-x 1 root root 20M  May 23:37 build/linux2/use-system-boost/libmongoclient.so

and installed in the/usr/lib/directory, the header file in the/usr/include directory

# ls/usr/lib/libmongoclient.*-alh-rw-r--r--1 root root 57M  May 23:35/usr/lib/libmongoclient.a-rwxr-xr-x 1 root R Oot 20M  May 23:37/usr/lib/libmongoclient.so

# ls/usr/include/mongo/base  Bson  buildinfo.cpp  client  db  logger  pch.cpp  pch.h  Platform  S  scripting  server.h  shell  targetver.h  Util
After two years of waiting, finally MongoDB C + + driver like a normal product.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.