samedi 26 septembre 2015

undefined reference to `'srandom'`

Why am I getting this error in lines 8 and 9?:

8 undefined reference to `srandom'
9 undefined reference to `srandom'

Code:

#include <stdio.h>
#include <stdlib.h>
#define RNG_SEED 9061

int main()
{
    long num = 0;
    srandom(RNG_SEED);
    num = srandom();

    printf("%ld", num);

    return 0;
}




Aucun commentaire:

Enregistrer un commentaire