Mac using Mersenne Twister in C

Discussion in 'C Programming' started by g000we, Mar 5, 2011.

  1. g000we

    g000we Guest

    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.
    g000we, Mar 5, 2011
    #1
    1. Advertising

  2. g000we

    g000we Guest

    On Mar 5, 1:39 am, g000we <> wrote:
    > 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
    g000we, Mar 5, 2011
    #2
    1. Advertising

  3. g000we

    copx Guest

    "g000we" wrote in message news:...

    > 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
    copx, Mar 5, 2011
    #3
  4. g000we

    g000we Guest

    On Mar 5, 1:58 am, "copx" <> wrote:
    > "g000we"  wrote in messagenews:...
    > > 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


    Ah! Cheers.
    Works now.
    g000we, Mar 5, 2011
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott Robert Ladd
    Replies:
    31
    Views:
    6,359
    Carsten Hansen
    Jan 7, 2004
  2. Simon

    Another Mersenne Twister question

    Simon, Oct 25, 2006, in forum: C Programming
    Replies:
    11
    Views:
    585
    Ben Pfaff
    Oct 26, 2006
  3. Nirjhar Oberoi

    TWISTER: Add 2 numbers using "SINGLE" variable

    Nirjhar Oberoi, Nov 23, 2006, in forum: C Programming
    Replies:
    7
    Views:
    1,181
    mdmuzammil
    Aug 10, 2010
  4. Fast Mersenne Twister

    , May 15, 2008, in forum: Python
    Replies:
    0
    Views:
    364
  5. Replies:
    0
    Views:
    477
Loading...

Share This Page