在 Visual Studio 中编译 OpenSSL

Compile OpenSSL in Visual Studio

我有

我提取了源代码,打开 Visual Studio Command Prompt (2010) 并输入以下命令:

perl Configure VC-WIN32 --prefix:C:\openSSL-win32

我收到这个错误:

It looks like you don't have either nmake.exe or dmake.exe on your PATH, so you will not be able to execute the commands from a Makefile. You can install dmake.exe with the Perl Package Manager by running: ppm install dmake

我肯定在 VS 命令提示符中有 nmake。我怎样才能告诉 Perl 在 VS 目录中看到我的 nmake?

P.S. 这些路径是我的%PATH%:


编辑:下面是我当前的路径。

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\
C:\Perl\site\bin
C:\Perl\bin
C:\app\User\product.2.0\client_1\bin
C:\ProgramData\Oracle\Java\javapath
C:\Program Files (x86)\Intel\iCLS Client\
C:\Program Files\Intel\iCLS Client\
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files\Intel\WiFi\bin\
C:\Program Files\Common Files\Intel\WirelessCommon\
C:\Program Files\ThinkPad\Bluetooth Software\
C:\Program Files\ThinkPad\Bluetooth Software\syswow64
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
C:\Program Files (x86)\Intel\OpenCL SDK.0\bin\x86
C:\Program Files (x86)\Intel\OpenCL SDK.0\bin\x64
C:\SWTOOLS\ReadyApps
C:\Program Files (x86)\Common Files\Lenovo
c:\Program Files (x86)\Microsoft SQL Server0\Tools\Binn\
c:\Program Files\Microsoft SQL Server0\Tools\Binn\
c:\Program Files\Microsoft SQL Server0\DTS\Binn\
C:\Program Files\Microsoft\Web Platform Installer\
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\
C:\Program Files (x86)\Windows Kits.0\Windows Performance Toolkit\
C:\Program Files\Microsoft SQL Server0\Tools\Binn\
C:\Program Files (x86)\Microsoft SQL Server0\Tools\Binn\VSShell\Common7\IDE\
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\
C:\Program Files (x86)\Microsoft SQL Server0\DTS\Binn\
C:\Program Files (x86)\NASM\

我是这样解决的(实际上是 github helped me). I installed Strawberry Perl, installed Visual Studio 2010 SP1 (free to download, about 1.5 GB, you can download ISO format too in Install Instructions section, this is necessary), installed Windows 7 SDK 7.1 (maybe isn't necessary, if nothing worked install it), istalled NASM 中的 openssl 开发人员。打开 Visual Studio 2010 命令提示符(快捷方式在开始菜单中)。转到打开 openSSL 的文件夹VS 命令提示符中存在源代码。然后输入这些命令:

perl Configure VC-WIN32    
nmake    
nmake test    
nmake install

nmake test 之后,您应该会看到 STATUS: PASSED。在 nmake install 之后检查您的 Program Files (x86) 文件夹。应该有两个DLL和openssl.exe.

P.S。将 NASM 和 Perl 放入您的 %PATH%.

祝你好运