Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8530371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:14:19+00:00 2026-06-11T09:14:19+00:00

I want to develop a fairly simple application using c++ for mongoDB and I

  • 0

I want to develop a fairly simple application using c++ for mongoDB and I follow their tutorials :
http://www.mongodb.org/pages/viewpage.action?pageId=133415

and for installing driver I followed this one :
https://groups.google.com/forum/?fromgroups=#!msg/mongodb-user/-mPG7MDJgm8/nZSiN42DJWIJ
(Waitman Gobble/5 jun answer)

but yet when I try to compile a simple application I will get following error :

fatal error: client/dbclient.h: No such file or directory

I’m pretty sure the problem is MongoDB c++ driver hasn’t installed yet.

How can I install it properly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:14:20+00:00Added an answer on June 11, 2026 at 9:14 am

    If you download the driver source code from here,

    Unpack and unzip

    tar xzf mongodb-linux-x86_64-v2.0-latest.tgz 
    

    Then cd into the directory.

    cd mongo-cxx-driver-v2.0/
    

    Then use scons to build

    scons
    

    and install

    sudo scons install
    

    Then to compile code shown in the tutorial you need to also specify the /usr/local/include/mongo directory as a include file search path.

    sudo  g++ tutorial.cpp -I/usr/local/include/mongo -lmongoclient 
    -lboost_thread -lboost_filesystem -lboost_program_options -o tutorial
    

    Then to run it you will need to edit the /etc/ld.so.conf file

    sudo vi /etc/ld.so.conf 
    

    and add

    /usr/local/lib
    

    Then run

    sudo ldconfig
    

    and run the tutorial

    $ ./tutorial 
    connected ok
    

    As an alternative to editing the ld.so.config file you can use the LD_LIBRARY_PATH environment variable. So you would do

    export LD_LIBRARY_PATH=/usr/local/lib
    $ ./tutorial 
    connected ok
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to develop a simple C application for learning purposes using Eclipse (Juno)
I want to develop a simple iPhone application. However, I do not have the
I want to develop an application for the business I work. We are using
I want to develop Android Mobile Application using Android + App Engine. I don't
i want to develop one desktop application using c# sql lite, this application i
I want develop some web product with using javascript 3d library like three.js But
I want to develop a program in c# that can target and application or
i want to develop an app for manage the desktop in windows using C#
I want to develop a task manager like application where I want to display
I want to develop a web app using html5, js. One of the feature

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.