Mac using Mersenne Twister in C

G

g000we

On my Mac, I downloaded the 64 bit version of the mt from:

http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt64.html

I have the test code, ran it using:

gcc -o mtTest mt19937-64.c

And got this error:

Undefined symbols:
"_genrand64_int64", referenced from:
_main in ccLQgmur.o
"_genrand64_real2", referenced from:
_main in ccLQgmur.o
"_init_by_array64", referenced from:
_main in ccLQgmur.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

If I run again, I get a completely different error:


Undefined symbols:
"_genrand64_int64", referenced from:
_main in ccjeMDqz.o
"_genrand64_real2", referenced from:
_main in ccjeMDqz.o
"_init_by_array64", referenced from:
_main in ccjeMDqz.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Ok i'm a bit of a n00b.
 
G

g000we

On my Mac, I downloaded the 64 bit version of the mt from:

http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt64.html

I have the test code, ran it using:

gcc -o mtTest mt19937-64.c

And got this error:

Undefined symbols:
  "_genrand64_int64", referenced from:
      _main in ccLQgmur.o
  "_genrand64_real2", referenced from:
      _main in ccLQgmur.o
  "_init_by_array64", referenced from:
      _main in ccLQgmur.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

If I run again, I get a completely different error:

Undefined symbols:
  "_genrand64_int64", referenced from:
      _main in ccjeMDqz.o
  "_genrand64_real2", referenced from:
      _main in ccjeMDqz.o
  "_init_by_array64", referenced from:
      _main in ccjeMDqz.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Ok i'm a bit of a n00b.

I meant to say I run:

gcc -o mt19937-64test mt19937-64test.c
 
C

copx

"g000we" wrote in message
gcc -o mt19937-64test mt19937-64test.c

And how is this supposed to work? That statement compiles
the MT test code, which depends on MT, but you don't compile
MT nor link against it. What you probably want is:

gcc -o mt19937-64test mt19937-64test.c mt19937-64.c
 
G

g000we

"g000we"  wrote in messagenews:[email protected]...

And how is this supposed to work? That statement compiles
the MT test code, which depends on MT, but you don't compile
MT nor link against it. What you probably want is:

gcc -o mt19937-64test mt19937-64test.c mt19937-64.c

Ah! Cheers.
Works now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top