Your browser version is outdated. We recommend that you update your browser to the latest version.

libstdc++ std::random_device among other things...

Posted 3/8/2021

I think I have a handle of the math.h issues I was having, but still managed to cut-and-not-paste a chunk of code, with time-wasting results. For some reason, libstdc++ isn't ernabling std::random by default, even though gcc-9.3.0 is C++11 compliant. Right now, it seems like we need to define _GLIBCXX_USE_C99_STDINT_TR1 to get the declaration, but compilation fails at the link stage because gcc could not find std::random_device::_M_getval_pretr1(). I don't like that '_pretr1' tag...

 

Finally got through this. The compiler is beginning to look less hacked together now. I still wonder whether the Raspberry Pi toolchain scripts would have made this endeavour easier.... They looked tailored to Linux when I first looked at them, though.... QNX provides their own libc, so I think it helped to focus on learning that one thing.