2016-12-28 275 views
0

我试图在我的C++应用程序#include <openssl/hmac.h>。于是,我就按照这个instructiosn:Visual Studio 2015 OpenSSL

http://www.askyb.com/windows/compiling-and-installing-openssl-for-32-bit-windows/comment-page-1/#comment-47532

我成功地这样做了:

  • 创建一个新的文件夹C:\的OpenSSL 1.0.1c
  • 从GitHub下载1.1.0c - https://github.com/openssl/openssl/tree/91eaf079b7430cb4ebb7f3ccabe74aa383b27c4e
  • 提取它C:\openssl-1.0.1c
  • 我下载并installedinstall的ActiveState Perl的
  • 在我的截图添加C:\perl\bin到我的路径是这样 - http://i.imgur.com/QOhKUwl.png
  • 创建一个新的文件夹C:\openssl-1.0.1c-bin
  • 与Win + R打开命令提示符,然后输入cmd
  • 然后用引号"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"粘贴,这是正确的道路,它存在我的系统上
  • 它跑,然后我也perl Configure VC-WIN32 no-asm – -prefix=C:\openssl-1.0.1c-bin(不含引号),它告诉我ppm install dmake得到nmake没等我说 - http://i.imgur.com/SuC65oo.png
  • 我输入nmake按这个问题 - https://github.com/curl/curl/issues/1002 - 它不再是可能做到nmake -f ms\ntdll.mak,这花一样15分钟
  • 据工作,然后就做了nmake test

所有测试都通过了,但我C:\openssl-1.0.1c-bin目录是空的,做#include <openssl/hmac.h>是不工作我的视觉工作室。

我是一个新手编写C++。

感谢

回答

1

你错过了在最后一步,运行此命令“NMAKE -f MS \ ntdll.mak安装”。它会将所有库复制到C:\ openssl-1.0.1g-bin。

如果你这样做,它会按预期工作。我只是在Windows 7和Visual Studio 2015本地尝试它,它工作正常。

有关nmake的警告是虚假的,您可以继续使用nmake ok。

+0

谢谢!我没有尝试但接受它。我会尝试一下,让你知道它是怎么回事。 :) – Noitidart