title: undefined reference,gmp lib
body: <p>I installed the gmp libraries in cygwin via its installer. I tried to compile a simple program with gcc.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;gmp.h&gt;
  
  
  int
  main(void)
  {
      mpz_t test;
      int i;
  
      printf("enter number\n");
      gmp_scanf("%Z",&amp;test);
      gmp_printf("test=%Z",test);
      i=mpz_probab_prime_p(test,5);
      if(i)
          printf("prime\n");
      else
          printf("not prime\n");
      return 0;
  }
  </code></pre>
  
  <p>But I got this:</p>
  
  <pre><code> /cygdrive/c/Users/xxxxx/Documents/NetBeansProjects/rsa_system/main.c:13: undefined reference to  `__imp____gmp_scanf'
  </code></pre>
  
  <p>This is the first time that I try to use a non-standard library and I'm getting confused here. My compiler is set to Cygwin and I've done all the installation part. Any ideas on what may be wrong? Thank you.</p>