<分区>
我正在尝试编译这段用 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);
}
我正在使用 Dev-C++。它给了我错误:对“SHA1”的 undefined reference 。 我创建了这个帖子: Undefined reference to `SHA1' 但我没有解决问题。 谁能帮帮我?