can't compile openssl because of 'cl' is not recognized

纵然是瞬间 提交于 2019-12-10 17:44:03

问题


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.


回答1:


The C++ tools are not being installed by default in Visual Studio 2015. Run the setup again, and install the C++ parts under "custom":



来源:https://stackoverflow.com/questions/31563735/cant-compile-openssl-because-of-cl-is-not-recognized

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!