Mac OS 10.2.3

Thu, 30 Jan 2003 04:42:47 -0600


My name is Jeremy Lezniak and I'm emailing you because I'm having difficulties 
installing GMP 4.1.2 on my mac (OS 10.2.3).  When I try running the sample 
through the complains that it can't find -lgmp.  I'm not too 
familiar with UNIX 
(I'm a mathematics student...not a computer science student) and would like as 
help as I can get.

I don't know if this helps...but I saved the output of the installation's the 
URL if you think it'll help:

Thank you for your time,
Jeremy Lezniak

This is the sample program I've been trying to run
#include <stdio.h>
    #include <gmp.h>

    main (int argc, char **argv)
      mpz_t a, b, p;

      if (argc != 3)
          printf ("Usage: %s <number> <number>\n", argv[0]);
          exit (1);

      /* Initialize and assign a and b from base 10 strings in argv */
      mpz_init_set_str (a, argv[1], 10);
      mpz_init_set_str (b, argv[2], 10);
      /* Initialize p */
      mpz_init (p);

      /* Multiply a and b and put the result in p */
      mpz_mul (p, a, b);

      /* Print p in decimal */
      gmp_printf ("%Zd\n", p);

      /* Since we're about to exit, no need to clear out variables */
      exit (0);