hello, everyone,<br><br>I just want use mpn_gcd to make a program, that can calculate gcd of two big integers, the following is my code named agcd.c:<br><br><br><br>#include &lt;stdio.h&gt;<br>#include &lt;gmp.h&gt;<br><br>
&nbsp;&nbsp;&nbsp; main (int argc, char **argv)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mpz_t a, b, p;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (argc != 3)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { printf (&quot;Usage: %s &lt;number&gt; &lt;number&gt;\n&quot;, argv[0]); exit (1); }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Initialize and assign a and b from base 10 strings in argv */
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mpz_init_set_str (a, argv[1], 10);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mpz_init_set_str (b, argv[2], 10);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Initialize p */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mpz_init (p);<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* compute the gcd of a and b*/<br>&nbsp;&nbsp;&nbsp;&nbsp; mp_size_t mpn_gcd (mp_limb_t *p, mp_limb_t *a,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mp_size_an, mp_limb_t *b, mp_size_t bn)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Print p in base 10 */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mpz_out_str (stdout, 10, p);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fputc ('\n', stdout);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Since we're about to exit, no need to clear out variables */
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit (0);<br>&nbsp;&nbsp;&nbsp; }<br><br><br><br>and when compiled, got the following error:<br><br>agcd.c: In function 'main':<br>agcd.c:9: warning: incompatible implicit declaration of built-in function 'exit'<br>agcd.c:20: error: syntax error before 'mp_size_an'
<br><br><br><br><br>so, please, anyone can give me some advise about this problem, thanks!<br><br>weifeng Jiang<br>