Why don't you just copy random() function behaviour from Lazarus systemh.inc and system.inc. Deep down it goes to
function genrand_MT19937: longint;which doesn't seem overly long. I don't see anything about the code that would compile differently on different platforms, apart from 2 compiler directives which i don't know when they're active:
{$ifdef FPC_HAS_FEATURE_RANDOM}
{$ifndef FPUNONE}But if you insist of using just the basic code, wouldn't it work the same?
So can someone say what my earlier mentioned code in formCreate would result on linux, win64, mac or something?