Hi,
I'm trying to use the FastNoise library with the Due, however, I get the following errors, when I try to complie.
- error: 'abs' was not declared in this scope
- error: 'mt19937' is not a member of 'std'
- error: 'uniform_int_distribution' is not a member of 'std'
What should I do in order to use the library?
Thanks!
Full error message:
Build options changed, rebuilding all
..\Documents\Arduino\libraries\FastNoise-0.4\FastNoise.cpp: In function 'int FastAbs(int)':
..\Documents\Arduino\libraries\FastNoise-0.4\FastNoise.cpp:183:41: error: 'abs' was not declared in this scope
static int FastAbs(int i) { return abs(i); }
^
..\Documents\Arduino\libraries\FastNoise-0.4\FastNoise.cpp: In member function 'void FastNoise::SetSeed(int)':
..\Documents\Arduino\libraries\FastNoise-0.4\FastNoise.cpp:198:2: error: 'mt19937' is not a member of 'std'
std::mt19937 gen(seed);
^
..\Documents\Arduino\libraries\FastNoise-0.4\FastNoise.cpp:198:15: error: expected ';' before 'gen'
std::mt19937 gen(seed);
^
..\Documents\Arduino\libraries\FastNoise-0.4\FastNoise.cpp:205:3: error: 'uniform_int_distribution' is not a member of 'std'
std::uniform_int_distribution<> dis(0, 256 - j);
^
..\Documents\Arduino\libraries\FastNoise-0.4\FastNoise.cpp:205:33: error: expected primary-expression before '>' token
std::uniform_int_distribution<> dis(0, 256 - j);
^
..\Documents\Arduino\libraries\FastNoise-0.4\FastNoise.cpp:205:49: error: 'dis' was not declared in this scope
std::uniform_int_distribution<> dis(0, 256 - j);
^
..\Documents\Arduino\libraries\FastNoise-0.4\FastNoise.cpp:206:15: error: 'gen' was not declared in this scope
int k = dis(gen) + j;
^
exit status 1
Error compiling for board Arduino Due (Programming Port).