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 7061623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:29:48+00:00 2026-05-28T04:29:48+00:00

Below is my list of includes. When I run the program I get this

  • 0

Below is my list of includes. When I run the program I get this error..

fatal error: boost/random/uniform_int_distribution.hpp: No such file or directory

Well…problem is the file is there and when I comment out the include the other files are found and the program compiles. I really don’t understands how this happens. Any explanation?

My boost home is /home/ubuntu/boost/ so the path is /home/ubuntu/boost/boost/random/uniform_int_distribution.hpp

Here is how I invoke:

 g++ rtb.cpp -o rtb.o -L/home/ubuntu/boost  -L/usr/local/include/ -lfcgi++

Here are te includes

#include <boost/tokenizer.hpp>
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_int_distribution.hpp>
#include <boost/bimap.hpp>
#include <boost/multi_array.hpp>
#include <cassert>
#include <boost/config.hpp>
#include <iostream>
#include <fstream>
#include <string>
#include <boost/tuple/tuple.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/visitors.hpp>
#include <boost/graph/breadth_first_search.hpp>
#include <map>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/identity.hpp>
#include <boost/multi_index/member.hpp>
  • 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-05-28T04:29:49+00:00Added an answer on May 28, 2026 at 4:29 am

    The problem is that you are using -L (which gives the directories where the libraries of object files can be found) when you should use -I giving the directory where the compiler will look for include files

    gcc’s documentation for library search also from gcc /usr/local/include is always included.

    Thus from @nttstar’s answer that the uniform_int_distribution.hpp header was added in boost 1.47 an before that there’s only uniform_int.hpp.

    I think the reason why you see the error just for this one header is that you are finding an older boost in /usr/local/include

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm obviously not quite getting the 'end-of-file' concept with C++ as the below program
I want to do the below list iteration in django templates: foo = ['foo',
I tried the following code in LINQPad and got the results given below: List<string>
I have below a list of text, it is from a popular online game
I would like to place my div below the list, but actually it is
I have a list (see below) contained in a window. The window's DataContext has
Below is an old PHP function I have for a dropdown list for users
Below is the code that I'm using in ms access to list the data
I have the code below for getting a list of child processes on windows
I have a comma separated list of strings like the one below. a,b ,c

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.