Visual Studio 2015 OpenSSL [英] Visual Studio 2015 OpenSSL
问题描述
我试图在我的C ++应用程序中#include <openssl/hmac.h>
.因此,我尝试遵循以下说明:
I was trying to #include <openssl/hmac.h>
in my C++ app. So I tried to follow this instructiosn:
- 创建一个新文件夹C:\ openssl-1.0.1c
- 从github下载1.1.0c- https://github.com/openssl/openssl/tree/91eaf079b7430cb4ebb7f3ccabe74aa383b27c4e
- 将其提取到
C:\openssl-1.0.1c
- 我下载并安装了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
,所以我做到了- https://github.com/curl /curl/issues/1002 -不再可能执行nmake -f ms\ntdll.mak
,这花费了大约15分钟的时间 - 它奏效了,然后我做了
nmake test
- Create a new folder C:\openssl-1.0.1c
- Downloaded 1.1.0c from github - https://github.com/openssl/openssl/tree/91eaf079b7430cb4ebb7f3ccabe74aa383b27c4e
- Extracted it to
C:\openssl-1.0.1c
- I downloaded and installedinstall ActiveState Perl
- Added
C:\perl\bin
to my path like this in my screenshot - http://i.imgur.com/QOhKUwl.png - Create a new folder
C:\openssl-1.0.1c-bin
- Opened command prompt with Win+R then typed
cmd
- Then pasted with quotes
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"
, which is the correct path, it exists on my system - It ran then I did
perl Configure VC-WIN32 no-asm – -prefix=C:\openssl-1.0.1c-bin
(no quotes), it told me toppm install dmake
to getnmake
so I did that - http://i.imgur.com/SuC65oo.png - I typed
nmake
as per this issue - https://github.com/curl/curl/issues/1002 - it is no longer possible to donmake -f ms\ntdll.mak
, this took like 15minutes - It worked then I did
nmake test
所有测试都通过了,但是我的C:\openssl-1.0.1c-bin
目录为空,并且执行#include <openssl/hmac.h>
不能在我的Visual Studio中工作.
All tests passed, however my C:\openssl-1.0.1c-bin
directory is empty and doing #include <openssl/hmac.h>
is not working my visual studio.
我是写c ++的新手.
I'm a newbie to writing c++.
谢谢
推荐答案
您错过了最后一步,请运行以下命令"nmake -f ms \ ntdll.mak install".它将所有库复制到C:\ openssl-1.0.1g-bin.
You missed a step at the end, Run this command "nmake -f ms\ntdll.mak install". It will copy all the libraries to C:\openssl-1.0.1g-bin.
如果这样做,它将按预期运行.我只是在Windows 7和Visual Studio 2015中在本地尝试过,效果很好.
If you do that it will work as expected. I just tried it locally with windows 7 and visual studio 2015 and it worked fine.
关于nmake的警告是虚假的,您可以继续使用nmake.
The warning about nmake is spurious you can continue using nmake ok.
这篇关于Visual Studio 2015 OpenSSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!