首页 > 解决方案 > 'nmake' 未被识别为内部或外部命令

问题描述

我想根据这个指令构建 c++ 库“botan”:( https://botan.randombit.net/handbook/building.html对于 Windows)

第二个命令是这样的:nmake.

结果我得到'nmake' is not recognized as an internal or external command

在我尝试打开nmake.exe后,最终得到了这个结果: cl /DBOTAN_DLL=__declspec(dllexport) /EHs /GR /D_WIN32_WINNT=0x0600 /MD /bigobj /O2 /Oi -DBOTAN_IS_BEING_BUILT /W4 /wd4250 /wd4251 /wd4275 /wd4127 /Ibuild\include /Ibuild\include\external /nologo /c C:/botan/botan/Botan-2.17.2/src/lib/asn1/alg_id.cpp /Fobuild\obj\lib\asn1_alg_id.obj

'cl' is not recognized as an internal or external command

NMAKE : fatal error U1077: cl : returned code "0x1"

Stop.

问题:如何连接nmake,或者如何建立一个botan库?

标签: c++qtnmakebotan

解决方案


构建说明假定nmake位于 PATH 上的某个位置。如果您运行随机cmdshell,则可能不会出现这种情况。此外,nmake假设其他可执行文件也将在 PATH 上。

使用 Visual Studio,有一个 Visual Studio 命令提示符。这是安装文件夹中的批处理文件。运行此命令会将 PATH 设置为特定的 Visual Studio 安装。因此,您可以运行nmake属于该 Visual Studio 安装。


推荐阅读