MongoDB 4.6.1 c ++ driver Compilation

Source: Internet
Author: User

This version is different from the previous one. It has a dedicated github project.

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

First, obtain the source code:

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

Switch the branch:

git checkout 26compat

Then compile with the following command:

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

This command will compile the. so and. a libraries, which are located in the build directory:

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

And installed in the/usr/lib/directory. the header file is in the/usr/include directory.

# Ls/usr/lib/lib1_client. *-alh-rw-r -- 1 root 57 M May 10 23:35/usr/lib/lib1_client. a-rwxr-xr-x 1 root 20 M May 10 23:37/usr/lib/lib1_client. 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, MongoDB's C ++ driver is 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.