import c++ <random> library

Hi !

i want to use the library from c++

#include <random>



std::normal_distribution<double> distrnN(wink_mean,.wink_deviation);

but i got this message : fatal error: random: No such file or directory

I want to generate a random number following a gaussian curve

The clue to the problem is in the error message

 fatal error: random: No such file or directory

You might have more success if you use

#include <random.h>

i tried it but still the same pb ... :frowning:

In general, the avr-g++ compiler doesn't support the "standard" C++ libraries.

i tried it but still the same pb …

Post your code, or a small but complete program and the error messages

For what it’s worth this compiles for me

#include <random.h>

void setup()
{
}

void loop()
{
}

Windows 7
IDE 1.5.6-r2

Does it include this function that the OP wanted?

std::normal_distribution<double> distrnN(wink_mean,.wink_deviation)

Just because it shares a root filename doesn’t mean it’s the same library!

westfw:
Just because it shares a root filename doesn't mean it's the same library!

I am well aware of that, but the OP was reporting a problem #including the library, not with using it. When he apparently managed to #include the library (post #2) he reported

i tried it but still the same pb .

but I bet he got a different one for the reason that you point out.