title: Undefined reference in C with gcrypt.h
body: <p>I'm trying to use the library gcrypt.h but show this error: </p>
  
  <blockquote>
    <p>undefined reference to `gcry_md_get_algo_dlen'    </p>
  </blockquote>
  
  <p>The code is:</p>
  
  <pre><code>int algo = GCRY_MD_SHA1;                                
  unsigned int hash_len = gcry_md_get_algo_dlen(algo); 
  unsigned char hash[hash_len]; 
  </code></pre>
  
  <p>How can I fix it?</p>