【发布时间】:2013-07-12 16:36:02
【问题描述】:
我做到了:
- 已安装 MinGW+MSYS
- 已安装 ActivePerl
- 将我需要的所有内容添加到 PATH
- 下载最新的 Openssl 并解压到 C:\openssl
- 在我的
cmd.exe中做了:perl 配置mingw shared --prefix=/c/openssl make depandmakemake install- cd 到 C:\cpp 我有我的 test.cpp :
test.cpp:
#include <stdio.h>
#include <string.h>
#include <openssl/md4.h>
int main()
{
unsigned char digest[MD4_DIGEST_LENGTH];
char string[] = "hello world";
MD4((unsigned char*)&string, strlen(string), (unsigned char*)&digest);
char mdString[33];
for(int i = 0; i < MD4_DIGEST_LENGTH; i++)
sprintf(&mdString[i*2], "%02x", (unsigned int)digest[i]);
printf("md4 digest: %s\n", mdString);
return 0;
}
试图编译它并得到了这个:
C:\cpp>g++ test.cpp -lcrypto
test.cpp:3:25: fatal error: openssl/md4.h: No such file or directory
compilation terminated.
我现在该怎么办?
【问题讨论】: