I am using Bloodshed DevC++ in windows 7. I installed the OpenSSL library package using the package installation feature in DEV.
I started with a simple C code to find the SHA. I am sure that the libraries are connecting correctly. But for some odd reason I am getting a linker error i.e. [linker error] Undefined reference to 'SHA1'
I have seen other sites including SOF but I am unable to figure out the source of the problem. I have seen various posts on SOF that address this issue but non of the comments address the problem I encounter. Any assistance will be highly appreciated. I have seen some people say that you need to use -lcrypto but I am confused what they are referring to.
[EDIT]
I give the code as follows:
#include <conio.h>
#include <stdio.h>
#include <string.h>
#include <openssl/sha.h>
int main ()
{
 unsigned char ibuf[] = "compute sha1";  
 unsigned char obuf[20];  
 SHA1(ibuf,strlen(ibuf),obuf); 
 int i=0;  
 for (i = 0; i < 20; i++)  
 {  
   printf("%02x ", obuf[i]);  
 }  
 printf("\n");  
 getch();  
}   
 
    