title: NesC / GMP Undefined Symbol
body: <p>I am trying to make a NesC program to use with TOSSIM (TinyOS simulator) including the gmp library
  Here is a sample of my code </p>
  
  <pre><code>event void Boot.booted()
          {
                  //dbg("MAPC", "Booted\n");
                  //int g = 2;
                  const char * const num = "10387922662657137735272585565990678424704150824246588991894422884684285337052622755228646547137908394766337363629003511269209591656314972254747436173398683";
                  int err;
  
                  mpz_t n;
                  err = mpz_init_set_str(n, num, 10);
  
                  dbg("MAPC","%d",sizeof(n));
  
                  mpz_clear(n);
          }
  </code></pre>
  
  <p>The compile runs fine using <code>make micaz sim</code> or <code>env "CFLAGS = -lgmp" make micaz sim</code>
  When I try to execute it via a python script I get this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "kdk.py", line 4, in &lt;module&gt;
      from TOSSIM import *
    File "/opt/tinyos-2.1.2/apps/MAP/TOSSIM.py", line 7, in &lt;module&gt;
      import _TOSSIM
  ImportError: /opt/tinyos-2.1.2/apps/MAP/_TOSSIMmodule.so: undefined symbol: __gmpz_init_set_str
  </code></pre>