I'm trying to compile this code written in C:
#include <stdio.h>
#include <stdlib.h>
#include <C:\OpenSSL-Win32\include\openssl\sha.h>
#include <string.h>
main() {
char data[] = "Hello, world!";
size_t length = strlen(data);
unsigned char hash[SHA_DIGEST_LENGTH];
SHA1(data, length, hash);
}
I'm using Dev-C++. It gives me the error : undefined reference to `SHA1'. I founded this post: Undefined reference to `SHA1' but I didn't solve the problem. Can anyone help me?