title: GMP(MPIR) linker errors on linux
body: <p>I wrote a public-private key generator using mpir(on windows) and it works fine. </p>
  
  <p>When I try to compile it on a linux machine using gmp library, it throws a whole bunch of linker errors.</p>
  
  <pre><code>/usr/bin/ld: /usr/lib/debug/usr/lib/crt1.o(.debug_info): relocation 0 has invali
  d symbol index 11
  /usr/bin/ld: /usr/lib/debug/usr/lib/crt1.o(.debug_info): relocation 1 has invali
  d symbol index 12
  /usr/bin/ld: /usr/lib/debug/usr/lib/crt1.o(.debug_info): relocation 2 has invali
  d symbol index 2
  /usr/bin/ld: /usr/lib/debug/usr/lib/crt1.o(.debug_info): relocation 3 has invali
  d symbol index 2
  /usr/bin/ld: /usr/lib/debug/usr/lib/crt1.o(.debug_info): relocation 4 has invali
  d symbol index 11
  /usr/bin/ld: /usr/lib/debug/usr/lib/crt1.o(.debug_info): relocation 5 has invali
  d symbol index 13
  /usr/bin/ld: /usr/lib/debug/usr/lib/crt1.o(.debug_info): relocation 6 has invali
  d symbol index 13
  ...
  /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start'
  :
  (.text+0x20): undefined reference to `main'
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>I'm using <code>g++ -lgmp prime.cpp</code>. I haven't used any non-gmp function. Any idea? I'm not adding code as there's a lot of it. </p>