Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » random_device cannot resolved
random_device cannot resolved [message #1219520] Wed, 04 December 2013 11:50 Go to next message
Shiu Fai Lee is currently offline Shiu Fai LeeFriend
Messages: 1
Registered: December 2013
Junior Member
I am running eclipse on ubuntu 12.04 and I have the following errors while I am trying to compile a program.


    cannot resolve random_device
    cannot resolve default_random_engine
    cannot resolve uniform_real_distribution
    cannot resolve uniform_real_distribution


Anyone knows how to fix it?
Re: random_device cannot resolved [message #1220474 is a reply to message #1219520] Thu, 12 December 2013 03:38 Go to previous messageGo to next message
Uchiha Itachi is currently offline Uchiha ItachiFriend
Messages: 2
Registered: December 2013
Junior Member
Reinstall?
Re: random_device cannot resolved [message #1387894 is a reply to message #1219520] Wed, 25 June 2014 18:52 Go to previous message
Johannes May is currently offline Johannes MayFriend
Messages: 1
Registered: June 2014
Junior Member
I had a similar problem (on KUbuntu; Eclipse Kepler and Luna): Eclipse gave me an error message ("The type random_device could not be resolved") when I tried using random_device in my code. But building and running the project was no problem.
I then had a look at the random include file (/usr/include/c++/4.8/random) and noticed that it basically is just a collection of other includes. I then searched these other includes for the one that had the declaration of the random_device type. This file is located at /usr/include/c++/4.8/bits/random.h.
So I just added this include to my problematic header file:
#include <bits/random.h>
And: Eclipse no longer gives me an error message! It's not a nice solution but at least it works.
Previous Topic:installing plugins
Next Topic:How do you make the user dictionary work?
Goto Forum:
  


Current Time: Sat Sep 21 17:14:59 GMT 2024

Powered by FUDForum. Page generated in 0.07761 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top