title: OpenSSL libs: 2 on Linux libcrypto and libssl and more than 13 on windows. What shall I link on windows to compile my sample?
body: <p>So I look at <a href="https://stackoverflow.com/questions/2262386/generate-sha256-with-openssl-and-c/2458382#2458382">this</a> sample code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #include "openssl/sha.h"
  
  void sha256(char *string, char outputBuffer[65])
  {
      unsigned char hash[SHA256_DIGEST_LENGTH];
      SHA256_CTX sha256;
      SHA256_Init(&amp;sha256);
      SHA256_Update(&amp;sha256, string, strlen(string));
      SHA256_Final(hash, &amp;sha256);
      int i = 0;
      for(i = 0; i &lt; SHA256_DIGEST_LENGTH; i++)
      {
          sprintf(outputBuffer + (i * 2), "%02x", hash[i]);
      }
      outputBuffer[64] = 0;
  }
  
  int sha256_file(char *path, char outputBuffer[65])
  {
      FILE *file = fopen(path, "rb");
      if(!file) return -534;
  
      byte hash[SHA256_DIGEST_LENGTH];
      SHA256_CTX sha256;
      SHA256_Init(&amp;sha256);
      const int bufSize = 32768;
      byte *buffer = malloc(bufSize);
      int bytesRead = 0;
      if(!buffer) return ENOMEM;
      while((bytesRead = fread(buffer, 1, bufSize, file)))
      {
          SHA256_Update(&amp;sha256, buffer, bytesRead);
      }
      SHA256_Final(hash, &amp;sha256);
  
      sha256_hash_string(hash, outputBuffer);
      fclose(file);
      free(buffer);
      return 0;
  }
  
  int main()
  {
      static unsigned char buffer[65];
      sha256("string", buffer);
      printf("%s\n", buffer);
  }
  </code></pre>
  
  <p>What libs shall I link to my project to compile this on windows?</p>