由于无法识别"cl",因此无法编译openssl [英] can't compile openssl because of 'cl' is not recognized
问题描述
我正在尝试为python脚本编译openssl库.我正在使用Windows x64位.
我现在正在按照以下步骤进行操作: https://github.com/dsoprea/M2CryptoWindows
一直有效,直到我在VS 2015的开发人员命令提示符"中键入此命令nmake -f ms\ntdll.mak
为止.
我收到此错误:
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
我看了该论坛的前几篇文章.解决方案说,将此路径添加到环境变量中:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
它没有解决问题.另外,当我浏览bin目录时,看不到他们指向其解决方案的文件为vcvars32.bat
.这就是我所看到的:
可以帮忙吗?我也想知道为什么VS 2015安装在Program Files(86)中而不是64个中?
请注意,我安装了SWIG并添加了环境变量:C:\grr-build\swigwin-3.0.6
更新:
我确实从VS安装了VC ++工具.我正在使用VS 2015社区版.我重复了这些步骤,这次我键入以下内容时遇到了另一个错误:nmake -f ms\ntdll.mak
错误提示:
C:\grr-build\openssl-1.0.2d>nmake -f ms\ntdll.mak
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
C:\grr-build\openssl-1.0.2d>nmake -f ms\ntdll.mak
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
Building OpenSSL
perl .\util\copy-if-different.pl ".\crypto\buildinf.h" "tmp32dll\buildin
f.h"
Copying: ./crypto/buildinf.h to tmp32dll/buildinf.h
perl .\util\copy-if-different.pl ".\crypto\opensslconf.h" "inc32\openssl
\opensslconf.h"
NOT copying: ./crypto/opensslconf.h to inc32/openssl/opensslconf.h
ml64 /c /Cp /Cx /Zi /Fotmp32dll\x86_64cpuid.obj tmp32dll\x86_64cpuid.asm
'ml64' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'ml64' : return code '0x1'
Stop.
C:\grr-build\openssl-1.0.2d>
更新: 在执行以下发布的解决方案后,此问题已解决,但请记住,您需要为nasm设置环境变量.
默认情况下,Visual Studio 2015中未安装C ++工具.再次运行安装程序,然后将C ++部件安装在"custom
"下:>
I am trying to compile openssl library for python script. I am using Windows x64 bit.
I am now following steps in this like: https://github.com/dsoprea/M2CryptoWindows
It worked till I type this command nmake -f ms\ntdll.mak
in the Developer Command Prompt for VS 2015.
I am getting this error:
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
I looked in the previous posts in this forum. Solutions says add this path to the environmental variables:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
It did not solve the problem. Also, when I navigate the bin directory, I do not see the file they pointed on their solutions which is: vcvars32.bat
. This is all what I see:
Can you help? also I am wondering why VS 2015 was installed in Program Files (86) not the 64 one?
Please, note that I installed the SWIG and added the environmental variable: C:\grr-build\swigwin-3.0.6
Update:
I did installed the VC++ tools from VS. I am using VS 2015 community edition. I repeated the steps, this time I got different error when I type: nmake -f ms\ntdll.mak
The error says:
C:\grr-build\openssl-1.0.2d>nmake -f ms\ntdll.mak
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
C:\grr-build\openssl-1.0.2d>nmake -f ms\ntdll.mak
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
Building OpenSSL
perl .\util\copy-if-different.pl ".\crypto\buildinf.h" "tmp32dll\buildin
f.h"
Copying: ./crypto/buildinf.h to tmp32dll/buildinf.h
perl .\util\copy-if-different.pl ".\crypto\opensslconf.h" "inc32\openssl
\opensslconf.h"
NOT copying: ./crypto/opensslconf.h to inc32/openssl/opensslconf.h
ml64 /c /Cp /Cx /Zi /Fotmp32dll\x86_64cpuid.obj tmp32dll\x86_64cpuid.asm
'ml64' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'ml64' : return code '0x1'
Stop.
C:\grr-build\openssl-1.0.2d>
Update: This issue has been resolved after doing the posted solution below but bear in mind you need to set the environmental variables for the nasm.
The C++ tools are not being installed by default in Visual Studio 2015. Run the setup again, and install the C++ parts under "custom
":
这篇关于由于无法识别"cl",因此无法编译openssl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!