Hello, everyone!
Thank you for your attention to my stupid problem.
I am trying to use Mersenne Twister library from agner.org/random/
This is an example program to compile.
#include <time.h>
#include <stdio.h>
#include "randoma.h"
int main() {
int seed = time(0);
double r;
MersenneRandomInit(seed);
r = MersenneRandom();
printf("\n%f", r);
return 0;
}
I compile it:
g++ cas.cpp -o a.out
I get two typical errors for novices:
undefined reference to `MersenneRandomInit'
undefined reference to `MersenneRandom'
collect2: ld returned 1 exit status
I believe I could find the solution myself but failed to do it in several hours.
Sorry for disturbance and good luck.